I have a vector of dates of size 10 and type numpy.ndarray. I also have an array of temperatures at each hour of size 10x24.
I want to print the dates in column A and the corresponding temperature in columns B through Y for rows 1 though 10 in a csv file.
My arrays look as following:
print(AllDays)
[datetime.date(2008, 12, 31) datetime.date(2009, 1, 1)
datetime.date(2009, 1, 2) ..., datetime.date(2015, 11, 28)
datetime.date(2015, 11, 29) datetime.date(2015, 11, 30)]
So far I have to trying to implement this using dataframes as below:
TempDay = pd.DataFrame()
TempDay['Dates'] = AllDays #of size 10
TempDay['Temperature'] = TemperatureArray #of size 10x24
If the previous step had worked I aimed at: TempDay.to_csv('C:\MyFile.csv')
But the above method has not been working.