小编Chi*_*may的帖子

将列标题转换为行值

我有一个看起来像这样的数据框

       Wash_Month  Wash_Day

0           3         2
1           4         3
Run Code Online (Sandbox Code Playgroud)

我需要将其转换为此

          Input              Value

0     Wash_Month/Wash_Day     3,2
1     Wash_Month/Wash_Day     4,3
Run Code Online (Sandbox Code Playgroud)

我尝试合并两列但无法将列标题转换为行值

谢谢.

python pandas

1
推荐指数
1
解决办法
430
查看次数

标签 统计

pandas ×1

python ×1