I am having trouble reading data. I am using Mac and have saved files on my desktop with the following names and can see them in the jupyter folder but cannot open them when trying with the following code. Can anyone advise ?
df_students = pd.read_excel(students.xlsx)
df_students
error:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-44-14c48be800d6> in <module>
----> 1 df_students = pd.read_excel(students.xlsx)
2 df_students
AttributeError: 'dict' object has no attribute 'xlsx'
df_census = pd.read_csv(census.csv)
df_census
error:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-45-fe5b1bb04ec7> in <module>
----> 1 df_census = pd.read_csv(census.csv)
2 df_census
NameError: name 'census' is not defined