Python | Pandas Series.sum() Last Updated : 10 Oct, 2018 Comments Improve Suggest changes Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas Series.sum() method is used to get the sum of the values for the requested axis. Syntax: Series.sum(axis=None, skipna=None, level=None, numeric_only=None, min_count=0) Parameters: axis : {index (0)} skipna[boolean, default True] : Exclude NA/null values. If an entire row/column is NA, the result will be NA level[int or level name, default None] : If the axis is a MultiIndex (hierarchical), count along a particular level, collapsing into a scalar. numeric_only[boolean, default None] : Include only float, int, boolean data. If None, will attempt to use everything, then use only numeric data Returns: Returns the sum of the values for the requested axis Code #1: By default, the sum of an empty or all-NA Series is 0. Python3 1== # importing pandas module import pandas as pd # min_count = 0 is the default pd.Series([]).sum() # When passed min_count = 1, # sum of an empty series will be NaN pd.Series([]).sum(min_count = 1) Output: 0.0 nan Code #2: Python3 1== # importing pandas module import pandas as pd # making data frame csv at url data = pd.read_csv("https://media.geeksforgeeks.org/wp-content/uploads/nba.csv") # sum of all salary val = data['Salary'].sum() val Output: 2159837111.0 Code #3: Python3 1== # importing pandas module import pandas as pd # making a dict of list data = {'name': ['John', 'Peter', 'Karl'], 'age' : [23, 42, 19]} val = pd.DataFrame(data) # sum of all salary val['total'] = val['age'].sum() val Output: Comment More infoAdvertise with us Next Article Python | Pandas Series.sum() S Shivam_k Follow Improve Article Tags : Python Python-pandas Python pandas-series Python pandas-series-methods Practice Tags : python Similar Reads Python | Pandas Series.sub() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric Python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Python Series.sub() is used to subtract series or list like objects with same length f 2 min read Python | Pandas Series.std() Pandas series is a One-dimensional ndarray with axis labels. The labels need not be unique but must be a hashable type. The object supports both integer- and label-based indexing and provides a host of methods for performing operations involving the index. Pandas Series.std() function return sample 2 min read Python Pandas Series Pandas Series is a one-dimensional labeled array that can hold data of any type (integer, float, string, Python objects, etc.). It is similar to a column in an Excel spreadsheet or a database table. In this article we will study Pandas Series a powerful one-dimensional data structure in Python.Key F 5 min read Python | Pandas Series.size Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas series is a One-dimensional ndarray with axis labels. The labels need not be un 2 min read Python | Pandas Series.shape Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas series is a One-dimensional ndarray with axis labels. The labels need not be un 2 min read Like