Handling Missing Data in Pandas
Get Job-Ready: Data Analysis using Python with 70+ Projects Start Now!!
Program 1
# Missing Values
import pandas as pd
myfile="D://mypandas/employee1.xlsx"
df=pd.read_excel(myfile)
print(df[['empname','TA']].dropna())
# print("Before")
# print(df)
# print("After")
# df=df.dropna()
# print(df)
# df.to_excel("D://mypandas/empnomissing.xlsx")
# print("----------------Success------------")
# print("Before")
# print(df)
# df.fillna(0,inplace=True)
# print("After")
# print(df)
We work very hard to provide you quality material
Could you take 15 seconds and share your happy experience on Google

