Site icon DataFlair

How to Create Pandas DataFrame using Excel and CSV

Free Pandas course with real-time projects Start Now!!

Program 1

import pandas as pd
# myfile=pd.read_excel("E://mypandas/mydata.xlsx",sheet_name='employee')
df=pd.read_excel("E://mypandas/mydata.xlsx",sheet_name='employee')
# df=pd.DataFrame(myfile)
print(df)
# df=pd.read_csv("E://mypandas/employee.csv")
# print(df)

 

 

Exit mobile version