5
5
import csv as csvlib
6
6
from io import StringIO
7
7
import os
8
- from typing import List , Optional , Sequence , Union
8
+ from typing import Hashable , List , Optional , Sequence , Union
9
9
import warnings
10
10
from zipfile import ZipFile
11
11
12
12
import numpy as np
13
13
14
14
from pandas ._libs import writers as libwriters
15
+ from pandas ._typing import FilePathOrBuffer
15
16
16
17
from pandas .core .dtypes .generic import (
17
18
ABCDatetimeIndex ,
21
22
)
22
23
from pandas .core .dtypes .missing import notna
23
24
24
- from pandas ._typing import FilePathOrBuffer
25
-
26
25
from pandas .io .common import (
27
26
get_compression_method ,
28
27
get_filepath_or_buffer ,
@@ -38,11 +37,11 @@ def __init__(
38
37
path_or_buf : Optional [FilePathOrBuffer [str ]] = None ,
39
38
sep : str = "," ,
40
39
na_rep : str = "" ,
41
- float_format = None ,
40
+ float_format : Optional [ str ] = None ,
42
41
cols = None ,
43
- header : Union [bool , Sequence [str ]] = True ,
42
+ header : Union [bool , Sequence [Hashable ]] = True ,
44
43
index : bool = True ,
45
- index_label = None ,
44
+ index_label : Optional [ Union [ bool , Hashable , Sequence [ Hashable ]]] = None ,
46
45
mode : str = "w" ,
47
46
encoding : Optional [str ] = None ,
48
47
compression = "infer" ,
@@ -52,7 +51,7 @@ def __init__(
52
51
quotechar : Optional [str ] = '"' ,
53
52
date_format : Optional [str ] = None ,
54
53
doublequote : bool = True ,
55
- escapechar = None ,
54
+ escapechar : Optional [ str ] = None ,
56
55
decimal : Optional [str ] = "." ,
57
56
):
58
57
self .obj = obj
0 commit comments