I am strugling with something in python...
I have a function that when I input a date, it gives me back a column with 30 prices (one in each line) and in index 30 names.
[in] getPrice('14/07/2015')
[out]
apple 10
pear 20
orange 12
banana 23
etc...
The number of fruit are the same. What I am trying to do is, to loop this function to obtain a big file with the price of these fruits for all the days I have in a list. with the ZIP function I dont really understand how it could work and with the append function it is not 'zipping' the price, meaning it recreate everytime the index, etc.. Any idea? I have a list with all my dates already and the index is the same all along, no other fruit apprear or disapear.
It could look like something
Def Alltogether():
Alltogether = []
x = HistoricalDates
For _ in Historicaldates :
k = getPrice....
and then I block...
I ultimately want something like
print Alltogether
[out]
apple 10 40 60 20 ...
pear 20 20 20 20 ...
orange 12 13 14 29 ...
banana 23 14 41 54 ...
etc...
I am using panda dataframe.
Thank you very much!