How to add data from one dataframe to another using Pandas transpose?

前端 未结 3 1029
没有蜡笔的小新
没有蜡笔的小新 2021-01-21 03:56

Objective: to fill in one dataframe with another using transpose

df = pd.DataFrame({\'Attributes\': [\'love\', \'family\',\'tech\']})
df.T
         


        
3条回答
  •  死守一世寂寞
    2021-01-21 04:19

    I think you just need to change the column name in df1

    df.columns=data.columns
    df
    Out[741]: 
               Attribute_01 Attribute_02 Attribute_03
    Attributes         love       family         tech
    

提交回复
热议问题