47
47
properties ,
48
48
)
49
49
from pandas ._libs .hashtable import duplicated
50
- from pandas ._libs .lib import (
51
- NoDefault ,
52
- is_range_indexer ,
53
- no_default ,
54
- )
50
+ from pandas ._libs .lib import is_range_indexer
55
51
from pandas .compat import PYPY
56
52
from pandas .compat ._optional import import_optional_dependency
57
53
from pandas .compat .numpy import (
@@ -6123,8 +6119,8 @@ def dropna(
6123
6119
self ,
6124
6120
* ,
6125
6121
axis : Axis = ...,
6126
- how : AnyAll | NoDefault = ...,
6127
- thresh : int | NoDefault = ...,
6122
+ how : AnyAll | lib . NoDefault = ...,
6123
+ thresh : int | lib . NoDefault = ...,
6128
6124
subset : IndexLabel = ...,
6129
6125
inplace : Literal [False ] = ...,
6130
6126
ignore_index : bool = ...,
@@ -6136,8 +6132,8 @@ def dropna(
6136
6132
self ,
6137
6133
* ,
6138
6134
axis : Axis = ...,
6139
- how : AnyAll | NoDefault = ...,
6140
- thresh : int | NoDefault = ...,
6135
+ how : AnyAll | lib . NoDefault = ...,
6136
+ thresh : int | lib . NoDefault = ...,
6141
6137
subset : IndexLabel = ...,
6142
6138
inplace : Literal [True ],
6143
6139
ignore_index : bool = ...,
@@ -6148,8 +6144,8 @@ def dropna(
6148
6144
self ,
6149
6145
* ,
6150
6146
axis : Axis = 0 ,
6151
- how : AnyAll | NoDefault = no_default ,
6152
- thresh : int | NoDefault = no_default ,
6147
+ how : AnyAll | lib . NoDefault = lib . no_default ,
6148
+ thresh : int | lib . NoDefault = lib . no_default ,
6153
6149
subset : IndexLabel = None ,
6154
6150
inplace : bool = False ,
6155
6151
ignore_index : bool = False ,
@@ -6252,12 +6248,12 @@ def dropna(
6252
6248
1 Batman Batmobile 1940-04-25
6253
6249
2 Catwoman Bullwhip NaT
6254
6250
"""
6255
- if (how is not no_default ) and (thresh is not no_default ):
6251
+ if (how is not lib . no_default ) and (thresh is not lib . no_default ):
6256
6252
raise TypeError (
6257
6253
"You cannot set both the how and thresh arguments at the same time."
6258
6254
)
6259
6255
6260
- if how is no_default :
6256
+ if how is lib . no_default :
6261
6257
how = "any"
6262
6258
6263
6259
inplace = validate_bool_kwarg (inplace , "inplace" )
@@ -6280,7 +6276,7 @@ def dropna(
6280
6276
raise KeyError (np .array (subset )[check ].tolist ())
6281
6277
agg_obj = self .take (indices , axis = agg_axis )
6282
6278
6283
- if thresh is not no_default :
6279
+ if thresh is not lib . no_default :
6284
6280
count = agg_obj .count (axis = agg_axis )
6285
6281
mask = count >= thresh
6286
6282
elif how == "any" :
@@ -8650,7 +8646,7 @@ def update(
8650
8646
def groupby (
8651
8647
self ,
8652
8648
by = None ,
8653
- axis : Axis | lib .NoDefault = no_default ,
8649
+ axis : Axis | lib .NoDefault = lib . no_default ,
8654
8650
level : IndexLabel | None = None ,
8655
8651
as_index : bool = True ,
8656
8652
sort : bool = True ,
@@ -8833,7 +8829,9 @@ def groupby(
8833
8829
8834
8830
@Substitution ("" )
8835
8831
@Appender (_shared_docs ["pivot" ])
8836
- def pivot (self , * , columns , index = lib .NoDefault , values = lib .NoDefault ) -> DataFrame :
8832
+ def pivot (
8833
+ self , * , columns , index = lib .no_default , values = lib .no_default
8834
+ ) -> DataFrame :
8837
8835
from pandas .core .reshape .pivot import pivot
8838
8836
8839
8837
return pivot (self , index = index , columns = columns , values = values )
0 commit comments