@@ -22,6 +22,7 @@ from pandas._typing import (
22
22
Dtype ,
23
23
FilePath ,
24
24
FilePathOrBuffer ,
25
+ FileWriteMode ,
25
26
FillnaOptions ,
26
27
FrameOrSeries ,
27
28
FrameOrSeriesUnion ,
@@ -213,9 +214,7 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
213
214
header : _bool | list [_str ] = ...,
214
215
index : _bool = ...,
215
216
index_label : Literal [False ] | _str | list [HashableT ] | None = ...,
216
- mode : Literal [
217
- "a" , "w" , "x" , "at" , "wt" , "xt" , "ab" , "wb" , "xb" , "w+" , "w+b" , "a+" , "a+b"
218
- ] = ...,
217
+ mode : FileWriteMode = ...,
219
218
encoding : _str | None = ...,
220
219
compression : CompressionOptions = ...,
221
220
quoting : int | None = ...,
@@ -240,9 +239,7 @@ class NDFrame(PandasObject, indexing.IndexingMixin):
240
239
header : _bool | list [_str ] = ...,
241
240
index : _bool = ...,
242
241
index_label : Literal [False ] | _str | list [HashableT ] | None = ...,
243
- mode : Literal [
244
- "a" , "w" , "x" , "at" , "wt" , "xt" , "ab" , "wb" , "xb" , "w+" , "w+b" , "a+" , "a+b"
245
- ] = ...,
242
+ mode : FileWriteMode = ...,
246
243
encoding : _str | None = ...,
247
244
compression : CompressionOptions = ...,
248
245
quoting : int | None = ...,
0 commit comments