I am trying to read data from a csv file into a pandas dataframe, and access the first column 'Date'
import pandas as pd
df_ticks=pd.read_csv('values.csv', delimiter=',')
print(df_ticks.columns)
df_ticks['Date']
produces the following result
Index([u'Date', u'Open', u'High', u'Low', u'Close', u'Volume'], dtype='object')
KeyError: u'no item named Date'
If I try to acces any other column like 'Open' or 'Volume' it is working as expected
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…