Answers for "create a new columns in pandas by dividing two columns"

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 "create a new columns in pandas by dividing two columns"

Python Answers by Framework

Browse Popular Code Answers by Language