Computations such as sum, mean, and median can be performed with ease on pandas DataFrames using the built-in mathematical methods in the pandas library. Let's make use of a subset of the sales data to explore the mathematical functions and methods in pandas. While applying these mathematical functions, it should be ensured that the selected columns are numeric. The following screenshot shows the data with five rows and three columns, all of which will be used in this section:
Sample sales data