我想从字典中分包16个数据帧,但我尝试了for循环,但不知道如何使用DictDataFrame完成代码:
DataFrameDict.keys() :
dict_keys([1, 10, 20, 30, 40, 47, 100, 15, 25, 35, 45, 50, 5, 105, 55, 0])
DataFrameDict[0]:
date_time id value Duration_datetime Duration(Min)
因此,我想为字典中的每个数据帧对每个列的持续时间(Min)进行子绘图,但我不知道如何处理:DataFrameDict[key]['Duration(Min)]
fig = plt.figure()
fig, ax = plt.subplots(nrows=4, ncols=4)
for i in range(4):
for j in range(4):
subplot = ax[i, j]
plt.show()
尝试展平轴阵列并使用zip循环:
.ravel
来展平axes array
是相当常见的。math.ceil
将确保有足够的行,当要打印的项目数不能被列数平均整除时李>for-loop
遍历枚举的dict keys
,使用idx
索引ax_array
中的正确值,并使用key
绘制每个数据帧李>相关问题 更多 >
编程相关推荐