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.mad  Mean absolute deviation
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.
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值