# pandas、numpy篇——运算符

pandas：

df.sum(0 or 1 ,skipna=True or False)
df.count    Number of non-NA observations
df.sum  Sum of values
df.mean Mean of values
df.median   Arithmetic median of values
df.min  Minimum  idxmin() index of min value
df.max  Maximum
df.mode Mode
df.abs  Absolute Value
df.prod Product of values
df.std  Bessel-corrected sample standard deviation
df.var  Unbiased variance
df.sem  Standard error of the mean
df.skew Sample skewness (3rd moment)
df.kurt Sample kurtosis (4th moment)
df.quantile Sample quantile (value at %)
df.cumsum   Cumulative sum
df.cumprod  Cumulative product
df.cummax   Cumulative maximum
df.cummin   Cumulative minimum

numpy：

ndarray.argmax([axis, out]) Return indices of the maximum values along the given axis.
ndarray.min([axis, out, keepdims])  Return the minimum along a given axis.
ndarray.argmin([axis, out]) Return indices of the minimum values along the given axis of a.
ndarray.ptp([axis, out])    Peak to peak (maximum - minimum) value along a given axis.
ndarray.clip([min, max, out])   Return an array whose values are limited to [min, max].
ndarray.conj()  Complex-conjugate all elements.
ndarray.round([decimals, out])  Return a with each element rounded to the given number of decimals.
ndarray.trace([offset, axis1, axis2, dtype, out])   Return the sum along diagonals of the array.
ndarray.sum([axis, dtype, out, keepdims])   Return the sum of the array elements over the given axis.
ndarray.cumsum([axis, dtype, out])  Return the cumulative sum of the elements along the given axis.
ndarray.mean([axis, dtype, out, keepdims])  Returns the average of the array elements along given axis.
ndarray.var([axis, dtype, out, ddof, keepdims]) Returns the variance of the array elements, along given axis.
ndarray.std([axis, dtype, out, ddof, keepdims]) Returns the standard deviation of the array elements along given axis.
ndarray.prod([axis, dtype, out, keepdims])  Return the product of the array elements over the given axis
ndarray.cumprod([axis, dtype, out]) Return the cumulative product of the elements along the given axis.
ndarray.all([axis, out, keepdims])  Returns True if all elements evaluate to True.
ndarray.any([axis, out, keepdims])  Returns True if any of the elements of a evaluate to True.

• 写评论