@@ -45,6 +45,8 @@ from pandas.core.indexes.multi import MultiIndex
4545from pandas .core .indexes .period import PeriodIndex
4646from pandas .core .indexes .timedeltas import TimedeltaIndex
4747from pandas .core .indexing import (
48+ _AtIndexer ,
49+ _iAtIndexer ,
4850 _iLocIndexer ,
4951 _IndexSliceTuple ,
5052 _LocIndexer ,
@@ -285,6 +287,44 @@ class _LocIndexerFrame(_LocIndexer, Generic[_T]):
285287 value : Scalar | NAType | NaTType | ArrayLike | Series | list | dict | None ,
286288 ) -> None : ...
287289
290+ class _iAtIndexerFrame (_iAtIndexer ):
291+ def __getitem__ (self , idx : tuple [int , int ]) -> Scalar : ...
292+ def __setitem__ (
293+ self ,
294+ idx : tuple [int , int ],
295+ value : Scalar | NAType | NaTType | None ,
296+ ) -> None : ...
297+
298+ class _AtIndexerFrame (_AtIndexer ):
299+ def __getitem__ (
300+ self ,
301+ idx : tuple [
302+ int
303+ | StrLike
304+ | Timestamp
305+ | tuple [Scalar , ...]
306+ | Callable [[DataFrame ], ScalarT ],
307+ int | StrLike | tuple [Scalar , ...],
308+ ],
309+ ) -> Scalar : ...
310+ def __setitem__ (
311+ self ,
312+ idx : (
313+ MaskType | StrLike | _IndexSliceTuple | list [ScalarT ] | IndexingInt | slice
314+ ),
315+ value : (
316+ Scalar
317+ | NAType
318+ | NaTType
319+ | ArrayLike
320+ | Series
321+ | DataFrame
322+ | list
323+ | Mapping [Hashable , Scalar | NAType | NaTType ]
324+ | None
325+ ),
326+ ) -> None : ...
327+
288328# With mypy 1.14.1 and python 3.12, the second overload needs a type-ignore statement
289329if sys .version_info >= (3 , 12 ):
290330 class _GetItemHack :
@@ -1108,7 +1148,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11081148 def groupby ( # pyright: ignore reportOverlappingOverload
11091149 self ,
11101150 by : Scalar ,
1111- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11121151 level : IndexLabel | None = ...,
11131152 as_index : Literal [True ] = True ,
11141153 sort : _bool = ...,
@@ -1120,7 +1159,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11201159 def groupby (
11211160 self ,
11221161 by : Scalar ,
1123- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11241162 level : IndexLabel | None = ...,
11251163 as_index : Literal [False ] = ...,
11261164 sort : _bool = ...,
@@ -1132,7 +1170,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11321170 def groupby ( # pyright: ignore reportOverlappingOverload
11331171 self ,
11341172 by : DatetimeIndex ,
1135- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11361173 level : IndexLabel | None = ...,
11371174 as_index : Literal [True ] = True ,
11381175 sort : _bool = ...,
@@ -1144,7 +1181,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11441181 def groupby ( # pyright: ignore reportOverlappingOverload
11451182 self ,
11461183 by : DatetimeIndex ,
1147- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11481184 level : IndexLabel | None = ...,
11491185 as_index : Literal [False ] = ...,
11501186 sort : _bool = ...,
@@ -1156,7 +1192,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11561192 def groupby ( # pyright: ignore reportOverlappingOverload
11571193 self ,
11581194 by : TimedeltaIndex ,
1159- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11601195 level : IndexLabel | None = ...,
11611196 as_index : Literal [True ] = True ,
11621197 sort : _bool = ...,
@@ -1168,7 +1203,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11681203 def groupby (
11691204 self ,
11701205 by : TimedeltaIndex ,
1171- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11721206 level : IndexLabel | None = ...,
11731207 as_index : Literal [False ] = ...,
11741208 sort : _bool = ...,
@@ -1180,7 +1214,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11801214 def groupby ( # pyright: ignore reportOverlappingOverload
11811215 self ,
11821216 by : PeriodIndex ,
1183- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11841217 level : IndexLabel | None = ...,
11851218 as_index : Literal [True ] = True ,
11861219 sort : _bool = ...,
@@ -1192,7 +1225,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
11921225 def groupby (
11931226 self ,
11941227 by : PeriodIndex ,
1195- axis : AxisIndex | _NoDefaultDoNotUse = ...,
11961228 level : IndexLabel | None = ...,
11971229 as_index : Literal [False ] = ...,
11981230 sort : _bool = ...,
@@ -1204,7 +1236,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12041236 def groupby ( # pyright: ignore reportOverlappingOverload
12051237 self ,
12061238 by : IntervalIndex [IntervalT ],
1207- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12081239 level : IndexLabel | None = ...,
12091240 as_index : Literal [True ] = True ,
12101241 sort : _bool = ...,
@@ -1216,7 +1247,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12161247 def groupby (
12171248 self ,
12181249 by : IntervalIndex [IntervalT ],
1219- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12201250 level : IndexLabel | None = ...,
12211251 as_index : Literal [False ] = ...,
12221252 sort : _bool = ...,
@@ -1228,7 +1258,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12281258 def groupby ( # type: ignore[overload-overlap] # pyright: ignore reportOverlappingOverload
12291259 self ,
12301260 by : MultiIndex | GroupByObjectNonScalar | None = ...,
1231- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12321261 level : IndexLabel | None = ...,
12331262 as_index : Literal [True ] = True ,
12341263 sort : _bool = ...,
@@ -1240,7 +1269,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12401269 def groupby ( # type: ignore[overload-overlap]
12411270 self ,
12421271 by : MultiIndex | GroupByObjectNonScalar | None = ...,
1243- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12441272 level : IndexLabel | None = ...,
12451273 as_index : Literal [False ] = ...,
12461274 sort : _bool = ...,
@@ -1252,7 +1280,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12521280 def groupby ( # pyright: ignore reportOverlappingOverload
12531281 self ,
12541282 by : Series [SeriesByT ],
1255- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12561283 level : IndexLabel | None = ...,
12571284 as_index : Literal [True ] = True ,
12581285 sort : _bool = ...,
@@ -1264,7 +1291,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12641291 def groupby (
12651292 self ,
12661293 by : Series [SeriesByT ],
1267- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12681294 level : IndexLabel | None = ...,
12691295 as_index : Literal [False ] = ...,
12701296 sort : _bool = ...,
@@ -1276,7 +1302,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12761302 def groupby (
12771303 self ,
12781304 by : CategoricalIndex | Index | Series ,
1279- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12801305 level : IndexLabel | None = ...,
12811306 as_index : Literal [True ] = True ,
12821307 sort : _bool = ...,
@@ -1288,7 +1313,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
12881313 def groupby (
12891314 self ,
12901315 by : CategoricalIndex | Index | Series ,
1291- axis : AxisIndex | _NoDefaultDoNotUse = ...,
12921316 level : IndexLabel | None = ...,
12931317 as_index : Literal [False ] = ...,
12941318 sort : _bool = ...,
@@ -1591,13 +1615,13 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
15911615 axis : Axis = 0 ,
15921616 skipna : _bool = True ,
15931617 numeric_only : _bool = False ,
1594- ) -> Series : ...
1618+ ) -> Series [ int ] : ...
15951619 def idxmin (
15961620 self ,
15971621 axis : Axis = 0 ,
15981622 skipna : _bool = True ,
15991623 numeric_only : _bool = False ,
1600- ) -> Series : ...
1624+ ) -> Series [ int ] : ...
16011625 def mode (
16021626 self ,
16031627 axis : Axis = 0 ,
@@ -1683,7 +1707,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
16831707 def __iter__ (self ) -> Iterator [Hashable ]: ...
16841708 # properties
16851709 @property
1686- def at (self ): ... # Not sure what to do with this yet; look at source
1710+ def at (self ) -> _AtIndexerFrame : ...
16871711 @property
16881712 def columns (self ) -> Index [str ]: ...
16891713 @columns .setter # setter needs to be right next to getter; otherwise mypy complains
@@ -1695,7 +1719,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
16951719 @property
16961720 def empty (self ) -> _bool : ...
16971721 @property
1698- def iat (self ): ... # Not sure what to do with this yet; look at source
1722+ def iat (self ) -> _iAtIndexerFrame : ...
16991723 @property
17001724 def iloc (self ) -> _iLocIndexerFrame [Self ]: ...
17011725 @property
0 commit comments