Answers for "how to change column name dataframe python"

0

renaming column in dataframe pandas

df.rename({'a': 'X', 'b': 'Y'}, axis=1, inplace=True)
df

   X  Y  c  d  e
0  x  x  x  x  x
1  x  x  x  x  x
2  x  x  x  x  x
Posted by: Guest on March-29-2021

Code answers related to "how to change column name dataframe python"

Python Answers by Framework

Browse Popular Code Answers by Language