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)

 

 

Did you like our efforts? If Yes, please give DataFlair 5 Stars on Google

follow dataflair on YouTube

Leave a Reply

Your email address will not be published. Required fields are marked *