熊猫高级数据分析

时间:2019-10-25 06:54:52

标签: pandas

7。使用生成的part_df_melted并更改part列以仅显示相应的零件号(用0或1代替part_0_hits或part_1_hits)

part_df_melted=part_df.set_index('time').stack().reset_index()
part_df_melted
time     level_1     0
0   0   part_0_hits  100
1   0   part_1_hits  25
2   1   part_0_hits  200
3   1   part_1_hits  50
4   2   part_0_hits  300
5   2   part_1_hits  75

在此之后我无法解决,请帮忙...

0 个答案:

没有答案