pandas读取表格的时候,经常把Excel表的列名也读取为数据。解决方法是把header设置为0而不是None
infection=pd.read_csv('dataset/data_processed/infection.csv',
sep=',',
header=0,
names=None)
若需要自己写列名,可以设置names
weather = pd.read_csv('dataset/train_data/city_B/weather.csv',
sep=',',
header=None,
names=['data','hour','temperature','humidity','wind_direction','wind_speed','wind_force','weather1'])