@@ -164,7 +164,6 @@ from pandas._typing import (
164
164
165
165
from pandas .io .formats .style import Styler
166
166
from pandas .plotting import PlotAccessor
167
- from pandas .plotting ._core import hist_frame
168
167
169
168
class _iLocIndexerFrame (_iLocIndexer , Generic [_T ]):
170
169
@overload
@@ -309,7 +308,7 @@ else:
309
308
@overload
310
309
def __getitem__ (self , key : Hashable ) -> Series : ...
311
310
312
- AstypeArgExt : TypeAlias = (
311
+ _AstypeArgExt : TypeAlias = (
313
312
AstypeArg
314
313
| Literal [
315
314
"number" ,
@@ -322,7 +321,7 @@ AstypeArgExt: TypeAlias = (
322
321
"datetime64[ns]" ,
323
322
]
324
323
)
325
- AstypeArgExtList : TypeAlias = AstypeArgExt | list [AstypeArgExt ]
324
+ _AstypeArgExtList : TypeAlias = _AstypeArgExt | list [_AstypeArgExt ]
326
325
327
326
class DataFrame (NDFrame , OpsMixin , _GetItemHack ):
328
327
@@ -769,11 +768,11 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
769
768
) -> Scalar | np .ndarray | Self | Series : ...
770
769
@overload
771
770
def select_dtypes (
772
- self , include : StrDtypeArg , exclude : AstypeArgExtList | None = ...
771
+ self , include : StrDtypeArg , exclude : _AstypeArgExtList | None = ...
773
772
) -> Never : ...
774
773
@overload
775
774
def select_dtypes (
776
- self , include : AstypeArgExtList | None , exclude : StrDtypeArg
775
+ self , include : _AstypeArgExtList | None , exclude : StrDtypeArg
777
776
) -> Never : ...
778
777
@overload
779
778
def select_dtypes (self , exclude : StrDtypeArg ) -> Never : ...
@@ -782,19 +781,19 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
782
781
@overload
783
782
def select_dtypes (
784
783
self ,
785
- include : AstypeArgExtList ,
786
- exclude : AstypeArgExtList | None = ...,
784
+ include : _AstypeArgExtList ,
785
+ exclude : _AstypeArgExtList | None = ...,
787
786
) -> Self : ...
788
787
@overload
789
788
def select_dtypes (
790
789
self ,
791
- include : AstypeArgExtList | None ,
792
- exclude : AstypeArgExtList ,
790
+ include : _AstypeArgExtList | None ,
791
+ exclude : _AstypeArgExtList ,
793
792
) -> Self : ...
794
793
@overload
795
794
def select_dtypes (
796
795
self ,
797
- exclude : AstypeArgExtList ,
796
+ exclude : _AstypeArgExtList ,
798
797
) -> Self : ...
799
798
def insert (
800
799
self ,
@@ -1330,17 +1329,15 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1330
1329
def stack (
1331
1330
self ,
1332
1331
level : IndexLabel = ...,
1333
- dropna : _bool = ...,
1334
- sort : _bool = ...,
1335
- future_stack : Literal [False ] = ...,
1332
+ future_stack : Literal [True ] = ...,
1336
1333
) -> Self | Series : ...
1337
1334
@overload
1338
1335
def stack (
1339
1336
self ,
1340
1337
level : IndexLabel = ...,
1341
- dropna : _NoDefaultDoNotUse = ...,
1342
- sort : _NoDefaultDoNotUse = ...,
1343
- future_stack : Literal [True ] = ...,
1338
+ dropna : _bool = ...,
1339
+ sort : _bool = ...,
1340
+ future_stack : Literal [False ] = ...,
1344
1341
) -> Self | Series : ...
1345
1342
def explode (
1346
1343
self , column : Sequence [Hashable ], ignore_index : _bool = ...
@@ -1376,9 +1373,9 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1376
1373
** kwargs : Any ,
1377
1374
) -> Self : ...
1378
1375
@overload
1379
- def aggregate (
1376
+ def aggregate ( # pyright: ignore[reportOverlappingOverload]
1380
1377
self ,
1381
- func : AggFuncTypeBase | AggFuncTypeDictSeries = ... ,
1378
+ func : AggFuncTypeBase | AggFuncTypeDictSeries ,
1382
1379
axis : Axis = ...,
1383
1380
** kwargs : Any ,
1384
1381
) -> Series : ...
@@ -1592,7 +1589,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1592
1589
method : Literal ["pearson" , "kendall" , "spearman" ] = ...,
1593
1590
numeric_only : _bool = ...,
1594
1591
) -> Series : ...
1595
- def count (self , axis : Axis = ..., numeric_only : _bool = ...) -> Self : ...
1592
+ def count (self , axis : Axis = ..., numeric_only : _bool = ...) -> Series [ int ] : ...
1596
1593
def nunique (self , axis : Axis = ..., dropna : bool = ...) -> Series : ...
1597
1594
def idxmax (
1598
1595
self , axis : Axis = ..., skipna : _bool = ..., numeric_only : _bool = ...
@@ -1637,7 +1634,24 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1637
1634
def isin (self , values : Iterable | Series | DataFrame | dict ) -> Self : ...
1638
1635
@property
1639
1636
def plot (self ) -> PlotAccessor : ...
1640
- hist = hist_frame
1637
+ def hist (
1638
+ self ,
1639
+ column : _str | list [_str ] | None = ...,
1640
+ by : _str | ListLike | None = ...,
1641
+ grid : _bool = ...,
1642
+ xlabelsize : float | str | None = ...,
1643
+ xrot : float | None = ...,
1644
+ ylabelsize : float | str | None = ...,
1645
+ yrot : float | None = ...,
1646
+ ax : PlotAxes | None = ...,
1647
+ sharex : _bool = ...,
1648
+ sharey : _bool = ...,
1649
+ figsize : tuple [float , float ] | None = ...,
1650
+ layout : tuple [int , int ] | None = ...,
1651
+ bins : int | list = ...,
1652
+ backend : _str | None = ...,
1653
+ ** kwargs : Any ,
1654
+ ): ...
1641
1655
def boxplot (
1642
1656
self ,
1643
1657
column : _str | list [_str ] | None = ...,
0 commit comments