First page Back Continue Last page Overview Graphics

Summing up Columns

We can calculate the sum of all the columns of a DataFrame or the sum of certain columns:

city_frame.sum())

city_frame["population"].sum()

33800614

name LondonBerlinMadridRomeParisViennaBucharestHamb...

country EnglandGermanySpainItalyFranceAustriaRomaniaGe...

population 33800614

dtype: object