55import csv as csvlib
66from io import StringIO
77import os
8- from typing import List , Optional , Sequence , Union
8+ from typing import Hashable , List , Optional , Sequence , Union
99import warnings
1010from zipfile import ZipFile
1111
1212import numpy as np
1313
1414from pandas ._libs import writers as libwriters
15+ from pandas ._typing import FilePathOrBuffer
1516
1617from pandas .core .dtypes .generic import (
1718 ABCDatetimeIndex ,
2122)
2223from pandas .core .dtypes .missing import notna
2324
24- from pandas ._typing import FilePathOrBuffer
25-
2625from pandas .io .common import (
2726 get_compression_method ,
2827 get_filepath_or_buffer ,
@@ -38,11 +37,11 @@ def __init__(
3837 path_or_buf : Optional [FilePathOrBuffer [str ]] = None ,
3938 sep : str = "," ,
4039 na_rep : str = "" ,
41- float_format = None ,
40+ float_format : Optional [ str ] = None ,
4241 cols = None ,
43- header : Union [bool , Sequence [str ]] = True ,
42+ header : Union [bool , Sequence [Hashable ]] = True ,
4443 index : bool = True ,
45- index_label = None ,
44+ index_label : Optional [ Union [ bool , Hashable , Sequence [ Hashable ]]] = None ,
4645 mode : str = "w" ,
4746 encoding : Optional [str ] = None ,
4847 compression = "infer" ,
@@ -52,7 +51,7 @@ def __init__(
5251 quotechar : Optional [str ] = '"' ,
5352 date_format : Optional [str ] = None ,
5453 doublequote : bool = True ,
55- escapechar = None ,
54+ escapechar : Optional [ str ] = None ,
5655 decimal : Optional [str ] = "." ,
5756 ):
5857 self .obj = obj
0 commit comments