有时候我们使用的数据,里面有些特征的列名比较混杂,我们需要更改一个清晰的特征名字

    • df``.``rename``({``' Income '``:``'Income'``},`` ``axis``=``1``,`` ``inplace``=``True``) 将特征' Income '改成'Income'
    • df.rename_axis("金牌排名",inplace=True)将索引的名字改为金牌排名
    • df.set_index("排名",inplace=True)重设索引为排名列