Answers for "change the value of a column based on another column pandas"

3

change specific column name pandas

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

how to find mean of one column based on another column in python

In [5]: df.groupby('Column1')['Column2'].mean()
Posted by: Guest on May-16-2020

Code answers related to "change the value of a column based on another column pandas"

Python Answers by Framework

Browse Popular Code Answers by Language