From the course: Python in Excel: Working with pandas DataFrames

Unlock the full course today

Join today to access over 23,300 courses taught by industry experts.

Calculations, vectorization, and empty cells

Calculations, vectorization, and empty cells

From the course: Python in Excel: Working with pandas DataFrames

Calculations, vectorization, and empty cells

- [Instructor] Now that we know how to select columns from data frames, it's a good moment to do some simple calculations. On the way, we'll learn what vectorization means and how empty cells are treated. First things first, as usual, we need to put the source data into a data frame. This time we're using the named range students from over here. Like with Excel tables, the Excel function here in M1 automatically adds a reference to the named range, so let's quickly rewrite the cell to see that in in action. As you can see, selecting that range automatically pulls in the name of the range, which is students in this case. Now we are ready for some basic math. Having the score for the two quizzes over here in columns F and G naturally asks us to calculate the total score by summing them up. For comparison, let's sum these two columns up first using native Excel formulas. So I would do most likely something like that, summing up these two fields and then applying the formula down over…

Contents