خرید بک لینک

Vote count: 0

I have the following dataframe:

Note: date is the index

city    moing afteoon   evening midnight
date                    
2014-05-01  YVR 2.32    4.26    -4.87   6.58
2014-05-01  YYZ 24.78   2.90    -50.55  6.64
2014-05-01  DFW 24.78   2.90    -50.55  6.64
2014-05-01  PDX 2.40    4.06    -4.06   6.54
2014-05-01  SFO 30.35   9.96    64.24   6.66

I try to save this df to a dict by df.to_dict() but I only get one row:

df.to_dict():

{'city': {Timestamp('2014-05-01 00:00:00'): 'SFO'},
 'moing': {Timestamp('2014-05-01 00:00:00'): 9.9600000000000009},
 'afteoon': {Timestamp('2014-05-01 00:00:00'): 6.6600000000000001},
 'evening': {Timestamp('2014-05-01 00:00:00'): 30.350000000000001},
 'midnight': {Timestamp('2014-05-01 00:00:00'): 64.239999999999995}}

Shouldn't the entire dataframe be output in the dict?

asked 1 min ago

برچسب: , , نویسنده: استخدام کار تاريخ: يکشنبه 17 مرداد 1395 ساعت: 7:14

صفحه بندی