@@ -40,13 +40,15 @@ from pandas._typing import (
4040 FilePath ,
4141 FileWriteMode ,
4242 FloatFormatType ,
43+ FormattersType ,
4344 Frequency ,
4445 HashableT1 ,
4546 HashableT2 ,
4647 HDFCompLib ,
4748 IgnoreRaise ,
4849 IndexLabel ,
4950 Level ,
51+ NpDtype ,
5052 OpenFileErrors ,
5153 P ,
5254 StorageOptions ,
@@ -56,9 +58,11 @@ from pandas._typing import (
5658 TimeGrouperOrigin ,
5759 TimestampConvertibleTypes ,
5860 WriteBuffer ,
61+ WriteExcelBuffer ,
5962 np_ndarray ,
6063)
6164
65+ from pandas .io .excel import ExcelWriter
6266from pandas .io .pytables import HDFStore
6367from pandas .io .sql import SQLTable
6468
@@ -99,11 +103,11 @@ class NDFrame:
99103 @property
100104 def empty (self ) -> _bool : ...
101105 __array_priority__ : int = ...
102- def __array__ (self , dtype = ... ) -> np_ndarray : ...
106+ def __array__ (self , dtype : NpDtype | None = None ) -> np_ndarray : ...
103107 @final
104108 def to_excel (
105109 self ,
106- excel_writer ,
110+ excel_writer : FilePath | WriteExcelBuffer | ExcelWriter ,
107111 sheet_name : _str = "Sheet1" ,
108112 na_rep : _str = "" ,
109113 float_format : _str | None = ...,
@@ -220,7 +224,7 @@ class NDFrame:
220224 header : _bool | list [_str ] = ...,
221225 index : _bool = ...,
222226 na_rep : _str = ...,
223- formatters = ... ,
227+ formatters : FormattersType | None = None ,
224228 float_format : FloatFormatType | None = None ,
225229 sparsify : _bool | None = ...,
226230 index_names : _bool = ...,
@@ -245,7 +249,7 @@ class NDFrame:
245249 header : _bool | list [_str ] = ...,
246250 index : _bool = ...,
247251 na_rep : _str = ...,
248- formatters = ... ,
252+ formatters : FormattersType | None = None ,
249253 float_format : FloatFormatType | None = None ,
250254 sparsify : _bool | None = ...,
251255 index_names : _bool = ...,
@@ -312,17 +316,15 @@ class NDFrame:
312316 errors : OpenFileErrors = ...,
313317 storage_options : StorageOptions = ...,
314318 ) -> _str : ...
315- @final
316- def __delitem__ (self , idx : Hashable ) -> None : ...
317319 @overload
318320 def drop (
319321 self ,
320322 labels : Hashable | Sequence [Hashable ] | Index | None = None ,
321323 * ,
322- axis = ... ,
324+ axis : Axis = 0 ,
323325 index : None ,
324- columns = ... ,
325- level = ... ,
326+ columns : Hashable | Iterable [ Hashable ] | None = None ,
327+ level : Level | None = None ,
326328 inplace : Literal [False ] = False ,
327329 errors : IgnoreRaise = "raise" ,
328330 ) -> Never : ...
@@ -331,10 +333,10 @@ class NDFrame:
331333 self ,
332334 labels : Hashable | Sequence [Hashable ] | Index | None = None ,
333335 * ,
334- axis = ... ,
335- index = ... ,
336+ axis : Axis = 0 ,
337+ index : Hashable | Sequence [ Hashable ] | Index | None = None ,
336338 columns : None ,
337- level = ... ,
339+ level : Level | None = None ,
338340 inplace : Literal [False ] = False ,
339341 errors : IgnoreRaise = "raise" ,
340342 ) -> Never : ...
@@ -343,10 +345,10 @@ class NDFrame:
343345 self ,
344346 labels : None ,
345347 * ,
346- axis = ... ,
347- index = ... ,
348- columns = ... ,
349- level = ... ,
348+ axis : Axis = 0 ,
349+ index : Hashable | Sequence [ Hashable ] | Index | None = None ,
350+ columns : Hashable | Iterable [ Hashable ] | None = None ,
351+ level : Level | None = None ,
350352 inplace : Literal [False ] = False ,
351353 errors : IgnoreRaise = "raise" ,
352354 ) -> Never : ...
@@ -355,10 +357,10 @@ class NDFrame:
355357 self ,
356358 labels : None = None ,
357359 * ,
358- axis : Axis = ... ,
359- index : Hashable | Sequence [Hashable ] | Index = ... ,
360+ axis : Axis = 0 ,
361+ index : Hashable | Sequence [Hashable ] | Index | None = None ,
360362 columns : Hashable | Iterable [Hashable ],
361- level : Level | None = ... ,
363+ level : Level | None = None ,
362364 inplace : Literal [True ],
363365 errors : IgnoreRaise = "raise" ,
364366 ) -> None : ...
@@ -367,10 +369,10 @@ class NDFrame:
367369 self ,
368370 labels : None = None ,
369371 * ,
370- axis : Axis = ... ,
372+ axis : Axis = 0 ,
371373 index : Hashable | Sequence [Hashable ] | Index ,
372- columns : Hashable | Iterable [Hashable ] = ... ,
373- level : Level | None = ... ,
374+ columns : Hashable | Iterable [Hashable ] | None = None ,
375+ level : Level | None = None ,
374376 inplace : Literal [True ],
375377 errors : IgnoreRaise = "raise" ,
376378 ) -> None : ...
@@ -379,10 +381,10 @@ class NDFrame:
379381 self ,
380382 labels : Hashable | Sequence [Hashable ] | Index ,
381383 * ,
382- axis : Axis = ... ,
384+ axis : Axis = 0 ,
383385 index : None = None ,
384386 columns : None = None ,
385- level : Level | None = ... ,
387+ level : Level | None = None ,
386388 inplace : Literal [True ],
387389 errors : IgnoreRaise = "raise" ,
388390 ) -> None : ...
@@ -391,10 +393,10 @@ class NDFrame:
391393 self ,
392394 labels : None = None ,
393395 * ,
394- axis : Axis = ... ,
395- index : Hashable | Sequence [Hashable ] | Index = ... ,
396+ axis : Axis = 0 ,
397+ index : Hashable | Sequence [Hashable ] | Index | None = None ,
396398 columns : Hashable | Iterable [Hashable ],
397- level : Level | None = ... ,
399+ level : Level | None = None ,
398400 inplace : Literal [False ] = False ,
399401 errors : IgnoreRaise = "raise" ,
400402 ) -> Self : ...
@@ -403,10 +405,10 @@ class NDFrame:
403405 self ,
404406 labels : None = None ,
405407 * ,
406- axis : Axis = ... ,
408+ axis : Axis = 0 ,
407409 index : Hashable | Sequence [Hashable ] | Index ,
408- columns : Hashable | Iterable [Hashable ] = ... ,
409- level : Level | None = ... ,
410+ columns : Hashable | Iterable [Hashable ] | None = None ,
411+ level : Level | None = None ,
410412 inplace : Literal [False ] = False ,
411413 errors : IgnoreRaise = "raise" ,
412414 ) -> Self : ...
@@ -415,10 +417,10 @@ class NDFrame:
415417 self ,
416418 labels : Hashable | Sequence [Hashable ] | Index ,
417419 * ,
418- axis : Axis = ... ,
420+ axis : Axis = 0 ,
419421 index : None = None ,
420422 columns : None = None ,
421- level : Level | None = ... ,
423+ level : Level | None = None ,
422424 inplace : Literal [False ] = False ,
423425 errors : IgnoreRaise = "raise" ,
424426 ) -> Self : ...
0 commit comments