I have a dictionary and want to group by day:
grouped_by_day = dict[k].groupby('Day')
After running the code, the groupby attribute groups only the last item of the dictionary.
Question:
- How to group by the same way all the items of the dictionary?
Dictionary looks like this (3 items):
{'ALUP11': ALUP11 Return % Day
Data
2020-09-02 23.81 0.548986 13.0
2020-09-01 23.68 1.067008 1.0
2020-08-31 23.43 -1.139241 31.0
2020-08-28 23.70 1.455479 28.0
2020-08-27 23.36 -0.680272 27.0
[3484 rows x 3 columns],
'CESP6': CESP6 Return % Day
Data
2020-09-02 29.38 -2.747435 13.0
2020-09-01 30.21 0.365449 1.0
2020-08-31 30.10 -2.336145 31.0
2020-08-28 30.82 1.615562 28.0
2020-08-27 30.33 -1.717434 27.0
[3484 rows x 3 columns],
'TAEE11': TAEE11 Return % Day
Data
2020-09-02 28.33 -0.770578 13.0
2020-09-01 28.55 1.205246 1.0
2020-08-31 28.21 -0.669014 31.0
2020-08-28 28.40 0.459851 28.0
2020-08-27 28.27 0.354988 27.0
[3484 rows x 3 columns]}
See Question&Answers more detail:os