@@ -8,6 +8,7 @@ from typing import (
8
8
Any ,
9
9
Callable ,
10
10
Literal ,
11
+ Mapping ,
11
12
Sequence ,
12
13
overload ,
13
14
)
@@ -48,26 +49,26 @@ def read_csv(
48
49
| None = ...,
49
50
dtype : DtypeArg | defaultdict | None = ...,
50
51
engine : CSVEngine | None = ...,
51
- converters : dict [int | str , Callable [[str ], Any ]]
52
- | dict [int , Callable [[str ], Any ]]
53
- | dict [str , Callable [[str ], Any ]]
52
+ converters : Mapping [int | str , Callable [[str ], Any ]]
53
+ | Mapping [int , Callable [[str ], Any ]]
54
+ | Mapping [str , Callable [[str ], Any ]]
54
55
| None = ...,
55
56
true_values : list [str ] = ...,
56
57
false_values : list [str ] = ...,
57
58
skipinitialspace : bool = ...,
58
59
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
59
60
skipfooter : int = ...,
60
61
nrows : int | None = ...,
61
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
62
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
62
63
keep_default_na : bool = ...,
63
64
na_filter : bool = ...,
64
65
verbose : bool = ...,
65
66
skip_blank_lines : bool = ...,
66
67
parse_dates : bool
67
- | Sequence [int ]
68
+ | list [int ]
68
69
| list [str ]
69
70
| Sequence [Sequence [int ]]
70
- | dict [str , Sequence [int ]] = ...,
71
+ | Mapping [str , Sequence [int | str ]] = ...,
71
72
infer_datetime_format : bool = ...,
72
73
keep_date_col : bool = ...,
73
74
date_parser : Callable = ...,
@@ -114,26 +115,26 @@ def read_csv(
114
115
| None = ...,
115
116
dtype : DtypeArg | defaultdict | None = ...,
116
117
engine : CSVEngine | None = ...,
117
- converters : dict [int | str , Callable [[str ], Any ]]
118
- | dict [int , Callable [[str ], Any ]]
119
- | dict [str , Callable [[str ], Any ]]
118
+ converters : Mapping [int | str , Callable [[str ], Any ]]
119
+ | Mapping [int , Callable [[str ], Any ]]
120
+ | Mapping [str , Callable [[str ], Any ]]
120
121
| None = ...,
121
122
true_values : list [str ] = ...,
122
123
false_values : list [str ] = ...,
123
124
skipinitialspace : bool = ...,
124
125
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
125
126
skipfooter : int = ...,
126
127
nrows : int | None = ...,
127
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
128
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
128
129
keep_default_na : bool = ...,
129
130
na_filter : bool = ...,
130
131
verbose : bool = ...,
131
132
skip_blank_lines : bool = ...,
132
133
parse_dates : bool
133
- | Sequence [int ]
134
+ | list [int ]
134
135
| list [str ]
135
136
| Sequence [Sequence [int ]]
136
- | dict [str , Sequence [int ]] = ...,
137
+ | Mapping [str , Sequence [int | str ]] = ...,
137
138
infer_datetime_format : bool = ...,
138
139
keep_date_col : bool = ...,
139
140
date_parser : Callable = ...,
@@ -180,26 +181,26 @@ def read_csv(
180
181
| None = ...,
181
182
dtype : DtypeArg | defaultdict | None = ...,
182
183
engine : CSVEngine | None = ...,
183
- converters : dict [int | str , Callable [[str ], Any ]]
184
- | dict [int , Callable [[str ], Any ]]
185
- | dict [str , Callable [[str ], Any ]]
184
+ converters : Mapping [int | str , Callable [[str ], Any ]]
185
+ | Mapping [int , Callable [[str ], Any ]]
186
+ | Mapping [str , Callable [[str ], Any ]]
186
187
| None = ...,
187
188
true_values : list [str ] = ...,
188
189
false_values : list [str ] = ...,
189
190
skipinitialspace : bool = ...,
190
191
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
191
192
skipfooter : int = ...,
192
193
nrows : int | None = ...,
193
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
194
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
194
195
keep_default_na : bool = ...,
195
196
na_filter : bool = ...,
196
197
verbose : bool = ...,
197
198
skip_blank_lines : bool = ...,
198
199
parse_dates : bool
199
- | Sequence [int ]
200
+ | list [int ]
200
201
| list [str ]
201
202
| Sequence [Sequence [int ]]
202
- | dict [str , Sequence [int ]] = ...,
203
+ | Mapping [str , Sequence [int | str ]] = ...,
203
204
infer_datetime_format : bool = ...,
204
205
keep_date_col : bool = ...,
205
206
date_parser : Callable = ...,
@@ -246,26 +247,26 @@ def read_table(
246
247
| None = ...,
247
248
dtype : DtypeArg | defaultdict | None = ...,
248
249
engine : CSVEngine | None = ...,
249
- converters : dict [int | str , Callable [[str ], Any ]]
250
- | dict [int , Callable [[str ], Any ]]
251
- | dict [str , Callable [[str ], Any ]]
250
+ converters : Mapping [int | str , Callable [[str ], Any ]]
251
+ | Mapping [int , Callable [[str ], Any ]]
252
+ | Mapping [str , Callable [[str ], Any ]]
252
253
| None = ...,
253
254
true_values : list [str ] = ...,
254
255
false_values : list [str ] = ...,
255
256
skipinitialspace : bool = ...,
256
257
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
257
258
skipfooter : int = ...,
258
259
nrows : int | None = ...,
259
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
260
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
260
261
keep_default_na : bool = ...,
261
262
na_filter : bool = ...,
262
263
verbose : bool = ...,
263
264
skip_blank_lines : bool = ...,
264
265
parse_dates : bool
265
- | Sequence [int ]
266
+ | list [int ]
266
267
| list [str ]
267
268
| Sequence [Sequence [int ]]
268
- | dict [str , Sequence [int ]] = ...,
269
+ | Mapping [str , Sequence [int | str ]] = ...,
269
270
infer_datetime_format : bool = ...,
270
271
keep_date_col : bool = ...,
271
272
date_parser : Callable = ...,
@@ -312,26 +313,26 @@ def read_table(
312
313
| None = ...,
313
314
dtype : DtypeArg | defaultdict | None = ...,
314
315
engine : CSVEngine | None = ...,
315
- converters : dict [int | str , Callable [[str ], Any ]]
316
- | dict [int , Callable [[str ], Any ]]
317
- | dict [str , Callable [[str ], Any ]]
316
+ converters : Mapping [int | str , Callable [[str ], Any ]]
317
+ | Mapping [int , Callable [[str ], Any ]]
318
+ | Mapping [str , Callable [[str ], Any ]]
318
319
| None = ...,
319
320
true_values : list [str ] = ...,
320
321
false_values : list [str ] = ...,
321
322
skipinitialspace : bool = ...,
322
323
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
323
324
skipfooter : int = ...,
324
325
nrows : int | None = ...,
325
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
326
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
326
327
keep_default_na : bool = ...,
327
328
na_filter : bool = ...,
328
329
verbose : bool = ...,
329
330
skip_blank_lines : bool = ...,
330
331
parse_dates : bool
331
- | Sequence [int ]
332
+ | list [int ]
332
333
| list [str ]
333
334
| Sequence [Sequence [int ]]
334
- | dict [str , Sequence [int ]] = ...,
335
+ | Mapping [str , Sequence [int | str ]] = ...,
335
336
infer_datetime_format : bool = ...,
336
337
keep_date_col : bool = ...,
337
338
date_parser : Callable = ...,
@@ -378,26 +379,26 @@ def read_table(
378
379
| None = ...,
379
380
dtype : DtypeArg | defaultdict | None = ...,
380
381
engine : CSVEngine | None = ...,
381
- converters : dict [int | str , Callable [[str ], Any ]]
382
- | dict [int , Callable [[str ], Any ]]
383
- | dict [str , Callable [[str ], Any ]]
382
+ converters : Mapping [int | str , Callable [[str ], Any ]]
383
+ | Mapping [int , Callable [[str ], Any ]]
384
+ | Mapping [str , Callable [[str ], Any ]]
384
385
| None = ...,
385
386
true_values : list [str ] = ...,
386
387
false_values : list [str ] = ...,
387
388
skipinitialspace : bool = ...,
388
389
skiprows : int | Sequence [int ] | Callable [[int ], bool ] = ...,
389
390
skipfooter : int = ...,
390
391
nrows : int | None = ...,
391
- na_values : Sequence [str ] | dict [str , Sequence [str ]] = ...,
392
+ na_values : Sequence [str ] | Mapping [str , Sequence [str ]] = ...,
392
393
keep_default_na : bool = ...,
393
394
na_filter : bool = ...,
394
395
verbose : bool = ...,
395
396
skip_blank_lines : bool = ...,
396
397
parse_dates : bool
397
- | Sequence [int ]
398
+ | list [int ]
398
399
| list [str ]
399
400
| Sequence [Sequence [int ]]
400
- | dict [str , Sequence [int ]] = ...,
401
+ | Mapping [str , Sequence [int | str ]] = ...,
401
402
infer_datetime_format : bool = ...,
402
403
keep_date_col : bool = ...,
403
404
date_parser : Callable = ...,
@@ -461,7 +462,7 @@ def read_fwf(
461
462
462
463
class TextFileReader (abc .Iterator ):
463
464
engine : CSVEngine
464
- orig_options : dict [str , Any ]
465
+ orig_options : Mapping [str , Any ]
465
466
chunksize : int | None
466
467
nrows : int | None
467
468
squeeze : bool
0 commit comments