@@ -437,6 +437,24 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
437
437
_str | npt .DTypeLike | Mapping [HashableT2 , npt .DTypeLike ] | None
438
438
) = ...,
439
439
) -> np .recarray : ...
440
+ @overload
441
+ def to_stata (
442
+ self ,
443
+ path : FilePath | WriteBuffer [bytes ],
444
+ * ,
445
+ convert_dates : dict [HashableT1 , StataDateFormat ] | None = ...,
446
+ write_index : _bool = ...,
447
+ byteorder : Literal ["<" , ">" , "little" , "big" ] | None = ...,
448
+ time_stamp : dt .datetime | None = ...,
449
+ data_label : _str | None = ...,
450
+ variable_labels : dict [HashableT2 , str ] | None = ...,
451
+ version : Literal [117 , 118 , 119 ],
452
+ convert_strl : SequenceNotStr [Hashable ] | None = ...,
453
+ compression : CompressionOptions = ...,
454
+ storage_options : StorageOptions = ...,
455
+ value_labels : dict [Hashable , dict [float , str ]] | None = ...,
456
+ ) -> None : ...
457
+ @overload
440
458
def to_stata (
441
459
self ,
442
460
path : FilePath | WriteBuffer [bytes ],
@@ -448,7 +466,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
448
466
data_label : _str | None = ...,
449
467
variable_labels : dict [HashableT2 , str ] | None = ...,
450
468
version : Literal [114 , 117 , 118 , 119 ] | None = ...,
451
- convert_strl : list [ Hashable ] | None = ...,
469
+ convert_strl : None = ...,
452
470
compression : CompressionOptions = ...,
453
471
storage_options : StorageOptions = ...,
454
472
value_labels : dict [Hashable , dict [float , str ]] | None = ...,
@@ -498,7 +516,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
498
516
def to_html (
499
517
self ,
500
518
buf : FilePath | WriteBuffer [str ],
501
- columns : list [Hashable ] | Index | Series | None = ...,
519
+ columns : SequenceNotStr [Hashable ] | Index | Series | None = ...,
502
520
col_space : ColspaceArgType | None = ...,
503
521
header : _bool = ...,
504
522
index : _bool = ...,
@@ -596,8 +614,8 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
596
614
root_name : str = ...,
597
615
row_name : str = ...,
598
616
na_rep : str | None = ...,
599
- attr_cols : list [Hashable ] | None = ...,
600
- elem_cols : list [Hashable ] | None = ...,
617
+ attr_cols : SequenceNotStr [Hashable ] | None = ...,
618
+ elem_cols : SequenceNotStr [Hashable ] | None = ...,
601
619
namespaces : dict [str | None , str ] | None = ...,
602
620
prefix : str | None = ...,
603
621
encoding : str = ...,
@@ -1690,7 +1708,7 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
1690
1708
def columns (self ) -> Index [str ]: ...
1691
1709
@columns .setter # setter needs to be right next to getter; otherwise mypy complains
1692
1710
def columns (
1693
- self , cols : AnyArrayLike | list [Hashable ] | tuple [Hashable , ...]
1711
+ self , cols : AnyArrayLike | SequenceNotStr [Hashable ] | tuple [Hashable , ...]
1694
1712
) -> None : ...
1695
1713
@property
1696
1714
def dtypes (self ) -> Series : ...
@@ -2368,8 +2386,8 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
2368
2386
def to_string (
2369
2387
self ,
2370
2388
buf : FilePath | WriteBuffer [str ],
2371
- columns : Sequence [Hashable ] | Index | Series | None = ...,
2372
- col_space : int | list [int ] | dict [Hashable , int ] | None = ...,
2389
+ columns : SequenceNotStr [Hashable ] | Index | Series | None = ...,
2390
+ col_space : int | list [int ] | dict [HashableT , int ] | None = ...,
2373
2391
header : _bool | list [_str ] | tuple [str , ...] = ...,
2374
2392
index : _bool = ...,
2375
2393
na_rep : _str = ...,
0 commit comments