Pandas: control new column names when merging two dataframes?

前端 未结 3 1053
北恋
北恋 2021-02-05 05:35

I would like to merge two Pandas dataframes together and control the names of the new column values.

I originally created the dataframes from CSV files. The original CS

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-05 05:50

    You can rename all the columns of ad by setting its columns as follows.

    ad.columns = ['org', 'name', 'presents_spend', 'trees_spend']
    

提交回复
热议问题