Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas divide one column by another

# We use the .div() method to divide colum/colum2
df['New_Column'] = df.colum.div(df.colum2)
 
PREVIOUS NEXT
Tagged: #pandas #divide #column
ADD COMMENT
Topic
Name
2+4 =