Updated for Pandas 0.24+
df.to_numpy().sum()
Prior to Pandas 0.24+
df.values
Is the underlying numpy array
df.values.sum()
Is the numpy sum method and is faster
More Related Contents:
- Split (explode) pandas dataframe string entry to separate rows
- Convert pandas dataframe to NumPy array
- Binning a column with Python Pandas
- Performant cartesian product (CROSS JOIN) with pandas
- Pandas: sum DataFrame rows for given columns
- String concatenation of two pandas columns
- How to take column-slices of dataframe in pandas
- What does axis in pandas mean?
- Numpy “where” with multiple conditions
- How to map numeric data into categories / bins in Pandas dataframe
- Calculate average of every x rows in a table and create new table
- Find column name in pandas that matches an array
- Coalesce values from 2 columns into a single column in a pandas dataframe
- How can I map True/False to 1/0 in a Pandas DataFrame?
- How to check if a value is in the list in selection from pandas data frame?
- Pandas finding local max and min
- SQL-like window functions in PANDAS: Row Numbering in Python Pandas Dataframe
- Select multiple ranges of columns in Pandas DataFrame
- Pandas lookup from one of multiple columns, based on value
- ‘DataFrame’ object has no attribute ‘sort’
- python pandas flatten a dataframe to a list
- how do I calculate a rolling idxmax
- What is dtype(‘O’), in pandas?
- Why is np.where faster than pd.apply
- Get total of Pandas column
- Unpivot Pandas Data
- Get first and second highest values in pandas columns
- Store numpy.array in cells of a Pandas.DataFrame
- Python pandas: how to remove nan and -inf values
- Filtering pandas dataframe with multiple Boolean columns