这本应该是一件简单的事情,但在搜索了几个小时后,我仍然不知道自己错在哪里。
我尝试使用MultiIndexing.from_和其他多种方法,但我就是无法做正确。
import pandas as pd
list_of_customers = ['Client1', 'Client2', 'Client3']
stat_index = ['max', 'current', 'min']
list_of_historic_timeframes = ['16:10', '16:20', '16:30']
timeblock = pd.DataFrame(index=([list_of_customers, stat_index]), columns=list_of_historic_timeframes)
timeblock.fillna(0, inplace=True)
print(timeblock)
timeblock.loc[('Client1', 'min'), '16:20'] = 3
- piRSquared