Answers for "how to divide all columns with a column in dataframe python"

1

divide two columns pandas

#If you want to divide column_name1 by column_name2
df['new_column'] = df.column_name1.div(df.column_name2)
Posted by: Guest on August-06-2021

Code answers related to "how to divide all columns with a column in dataframe python"

Python Answers by Framework

Browse Popular Code Answers by Language