What's the best way to sum all values in a Pandas dataframe?
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
df.to_numpy().sum()
df.values
Is the underlying numpy array
df.values.sum()
Is the numpy sum method and is faster