Answers for "subtract from dataframe column"

0

subtract from dataframe column

#To subtract 1 from a specific column of a dataframe
df.column_name.sub(1)
Posted by: Guest on August-06-2021
0

subtract from dataframe

#To subtract 1 from all columns of dataframe
df.sub(1)
Posted by: Guest on August-06-2021

Code answers related to "subtract from dataframe column"

Python Answers by Framework

Browse Popular Code Answers by Language