How to Handle Missing Data fillna and dropna in Pandas
Free Pandas course with real-time projects Start Now!!
program 1
import pandas as pd df=pd.read_excel("E://mypandas/employee.xlsx") # df=df.fillna(0) # print(df) # print("Before Drop") # print(df) # df=df.dropna() # print("After Drop") # print("--------------------------------") # print(df) print(df[['empname','HRA']].fillna(0))
Your opinion matters
Please write your valuable feedback about DataFlair on Google
Very interesting, thanks for providing this invaluable lesson.