I have 5 coloums 1000+ rows csv file. I found the mean value. However, I need your help to apply euclidean distance algorithm and fill the Missing value. Kindly help me, folks.
import pandas as pd import numpy as np from numpy import nan import csv from pandas import DataFrame # Read csv file into a pandas dataframe df = pd.read_csv(".\SampleData.csv", na_values = missing_values) print (df) #Fill the mean value on missing cells df.fillna(df.mean()) #Fill the Mean value based on Class - Task2 print("Missing fields filled based on Class Value") df = df.fillna(df.groupby('Class').transform('mean')) print(df)```` I completed finding the mean value to fill the Missing values