Reputation: 125
I uploaded UK housing index' data and heres the code for importing,
ukhindex = pd.read_csv('ukhindex.csv')
ukhindex.head()
It returns this table:
However when I try to call the Index column,
ukhindex["Date"].head()
It gives me this error instead.
Here some addition details about my table.
Can someone please help.
Upvotes: 0
Views: 292
Reputation: 125
Not sure why it wasnt picking the column but I just referenced it through column number.
ukhindex.iloc[1:10,4]
it works fine...
Edit : Turns out on the original CSV file each of the colomn headers had a space at the end before the comma. Thats why it wasnt picking them up...
Upvotes: 1