python pandas - Editing multiple DataFrames with a for loop

前端 未结 6 769
误落风尘
误落风尘 2021-01-06 18:30

Considering the following 2 lists of 3 dicts and 3 empty DataFrames

dict0={\'actual\': {\'2013-02-20 13:30:00\': 0.93}}
dict1={\'actual\': {\'2013-02-20 13:3         


        
6条回答
  •  春和景丽
    2021-01-06 19:05

    You need to keep the reference to the df objects, so you can try:

    for idx, dikt in enumerate(dicts):
        dfs[idx] = dfs[idx].from_dict(dikt, orient='columns', dtype=None)
    

提交回复
热议问题