Answers for "how to change same column name df"

3

change specific column name pandas

df_new = df.rename(columns={'A': 'a'}) #change a from A
Posted by: Guest on May-21-2020
-1

dataframe names pandas

print(df.rename(columns={'A': 'a', 'C': 'c'}))
Posted by: Guest on November-24-2020

Python Answers by Framework

Browse Popular Code Answers by Language