Pandas is used for data handling and manipulation to a large extent so pandas have some mathematical operation, There are certainly numerous instances while dealing with data science task where we perform some basic mathematical operations.
Here are some of them:
- add(): It performs the addition of dataframes which is done element-wise.
- sub(): It is used to perform subtraction on dataframes.
- mul(): It is used to perform multiplication on dataframes.
- div(): It is used to perform division on dataframes.
- sum(): It performs the sum of the values for the desired axis.
- agg(): It is used to find the aggregate using one or more operations over the desired axis.