【问题标题】:How to delete fist row and replace fist column to index pandas如何删除第一行并替换第一列以索引熊猫
【发布时间】:2022-06-13 14:46:16
【问题描述】:

如何删除第一行替换第二行,替换第一列来索引pandas

enter image description here

【问题讨论】:

    标签: python python-3.x pandas dataframe csv


    【解决方案1】:

    IIUC 使用:

    df = pd.DataFrame(res).set_index('code').T
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-12-12
      • 2016-08-05
      • 1970-01-01
      • 2021-08-28
      • 2021-01-10
      • 2019-08-01
      • 1970-01-01
      • 2014-09-06
      相关资源
      最近更新 更多