37
37
TimestampConvertibleTypes ,
38
38
npt ,
39
39
)
40
- from pandas .compat .numpy import function as nv
41
40
from pandas .errors import (
42
41
AbstractMethodError ,
43
42
DataError ,
@@ -899,75 +898,54 @@ def sum(
899
898
self ,
900
899
numeric_only : bool = False ,
901
900
min_count : int = 0 ,
902
- * args ,
903
- ** kwargs ,
904
901
):
905
- nv .validate_resampler_func ("sum" , args , kwargs )
906
902
return self ._downsample ("sum" , numeric_only = numeric_only , min_count = min_count )
907
903
908
904
@doc (GroupBy .prod )
909
905
def prod (
910
906
self ,
911
907
numeric_only : bool = False ,
912
908
min_count : int = 0 ,
913
- * args ,
914
- ** kwargs ,
915
909
):
916
- nv .validate_resampler_func ("prod" , args , kwargs )
917
910
return self ._downsample ("prod" , numeric_only = numeric_only , min_count = min_count )
918
911
919
912
def min (
920
913
self ,
921
914
numeric_only : bool = False ,
922
915
min_count : int = 0 ,
923
- * args ,
924
- ** kwargs ,
925
916
):
926
- nv .validate_resampler_func ("min" , args , kwargs )
927
917
return self ._downsample ("min" , numeric_only = numeric_only , min_count = min_count )
928
918
929
919
def max (
930
920
self ,
931
921
numeric_only : bool = False ,
932
922
min_count : int = 0 ,
933
- * args ,
934
- ** kwargs ,
935
923
):
936
- nv .validate_resampler_func ("max" , args , kwargs )
937
924
return self ._downsample ("max" , numeric_only = numeric_only , min_count = min_count )
938
925
939
926
@doc (GroupBy .first )
940
927
def first (
941
928
self ,
942
929
numeric_only : bool = False ,
943
930
min_count : int = 0 ,
944
- * args ,
945
- ** kwargs ,
946
931
):
947
- nv .validate_resampler_func ("first" , args , kwargs )
948
932
return self ._downsample ("first" , numeric_only = numeric_only , min_count = min_count )
949
933
950
934
@doc (GroupBy .last )
951
935
def last (
952
936
self ,
953
937
numeric_only : bool = False ,
954
938
min_count : int = 0 ,
955
- * args ,
956
- ** kwargs ,
957
939
):
958
- nv .validate_resampler_func ("last" , args , kwargs )
959
940
return self ._downsample ("last" , numeric_only = numeric_only , min_count = min_count )
960
941
961
942
@doc (GroupBy .median )
962
- def median (self , numeric_only : bool = False , * args , ** kwargs ):
963
- nv .validate_resampler_func ("median" , args , kwargs )
943
+ def median (self , numeric_only : bool = False ):
964
944
return self ._downsample ("median" , numeric_only = numeric_only )
965
945
966
946
def mean (
967
947
self ,
968
948
numeric_only : bool = False ,
969
- * args ,
970
- ** kwargs ,
971
949
):
972
950
"""
973
951
Compute mean of groups, excluding missing values.
@@ -986,15 +964,12 @@ def mean(
986
964
DataFrame or Series
987
965
Mean of values within each group.
988
966
"""
989
- nv .validate_resampler_func ("mean" , args , kwargs )
990
967
return self ._downsample ("mean" , numeric_only = numeric_only )
991
968
992
969
def std (
993
970
self ,
994
971
ddof : int = 1 ,
995
972
numeric_only : bool = False ,
996
- * args ,
997
- ** kwargs ,
998
973
):
999
974
"""
1000
975
Compute standard deviation of groups, excluding missing values.
@@ -1017,15 +992,12 @@ def std(
1017
992
DataFrame or Series
1018
993
Standard deviation of values within each group.
1019
994
"""
1020
- nv .validate_resampler_func ("std" , args , kwargs )
1021
995
return self ._downsample ("std" , ddof = ddof , numeric_only = numeric_only )
1022
996
1023
997
def var (
1024
998
self ,
1025
999
ddof : int = 1 ,
1026
1000
numeric_only : bool = False ,
1027
- * args ,
1028
- ** kwargs ,
1029
1001
):
1030
1002
"""
1031
1003
Compute variance of groups, excluding missing values.
@@ -1049,36 +1021,26 @@ def var(
1049
1021
DataFrame or Series
1050
1022
Variance of values within each group.
1051
1023
"""
1052
- nv .validate_resampler_func ("var" , args , kwargs )
1053
1024
return self ._downsample ("var" , ddof = ddof , numeric_only = numeric_only )
1054
1025
1055
1026
@doc (GroupBy .sem )
1056
1027
def sem (
1057
1028
self ,
1058
1029
ddof : int = 1 ,
1059
1030
numeric_only : bool = False ,
1060
- * args ,
1061
- ** kwargs ,
1062
1031
):
1063
- nv .validate_resampler_func ("sem" , args , kwargs )
1064
1032
return self ._downsample ("sem" , ddof = ddof , numeric_only = numeric_only )
1065
1033
1066
1034
@doc (GroupBy .ohlc )
1067
1035
def ohlc (
1068
1036
self ,
1069
- * args ,
1070
- ** kwargs ,
1071
1037
):
1072
- nv .validate_resampler_func ("ohlc" , args , kwargs )
1073
1038
return self ._downsample ("ohlc" )
1074
1039
1075
1040
@doc (SeriesGroupBy .nunique )
1076
1041
def nunique (
1077
1042
self ,
1078
- * args ,
1079
- ** kwargs ,
1080
1043
):
1081
- nv .validate_resampler_func ("nunique" , args , kwargs )
1082
1044
return self ._downsample ("nunique" )
1083
1045
1084
1046
@doc (GroupBy .size )
0 commit comments