1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
U
¬ý°d(-ã2@sd dZddlmZddlmZddlZddlZddlmZddl    m
Z
ddl m Z m Z mZmZmZmZmZmZddlZddlZddlmZdd    lmZdd
lmZmZmZmZm Z m!Z!m"Z"m#Z#dd l$m%Z%m&Z&dd l'm(Z(dd l)m*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9m:Z:m;Z;m<Z<ddl=m>Z>ddl?m@Z@mAZAmBZBddlCmDZDddlEmFZFmGZGded HeIeƒ¡ddddZJdddddd œZKd!d"dd#œZLd$hZMd%d&hZNd$d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d%hZOGd6d7„d7eƒZPed£d9d:d9d;œd<d=„ƒZQed¤d>d:d:d;œd?d=„ƒZQed¥d@d:d@d;œdAd=„ƒZQd¦dBd:d@d;œdCd=„ZQdDd9dEœdFdG„ZRdHdIdJœdKdL„ZSed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8dMœ/dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdUdVdTdWdTdTdXd@dYdWdZdWdZd:dTdWdWdWdWd[dTdTd\d]d^d_d`œ)dadb„ƒZTed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8dcœ/dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdUdVdTdWdTdTdTd:dYdWdZdWdZd:dTdWdWdWdWd[dTdTd\d]d^d_d`œ)dddb„ƒZTed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8deœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdUdVdTdWdTdTdfd9dYdWdZdWdZd:dTdWdWdWdWd[dTdTd\d]d^dgd`œ)dhdb„ƒZTed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8deœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdUdVdTdWdTdTdTd@dYdWdZdWdZd:dTdWdWdWdWd[dTdTd\d]d^dId`œ)didb„ƒZTe(eJjUdbdjdke7dle7dmdndoƒejVdd!ejVdddddddddddddddddejVdejVdddddd!ddpddqejWdddddrddsdeKd%dddejVdeœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdUdVdTdWdTdTdTd@dYdWdZdWdZd:dTdWdWdWdWd[dZdTdTd\d]d^dIdtœ*dudb„ƒZTed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8dMœ/dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdvdVdTdWdTdTdXd@dYdWdZdWdZd:dTdWdWdWdWd[dTdTdWd]d^d_d`œ)dwdx„ƒZXed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8dcœ/dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdvdVdTdWdTdTdTd:dYdWdZdWdZd:dTdWdWdWdWd[dTdTdWd]d^d_d`œ)dydx„ƒZXed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8deœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdvdVdTdWdTdTdfd9dYdWdZdWdZd:dTdWdWdWdWd[dTdTdWd]d^dgd`œ)dzdx„ƒZXed8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8d8deœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdvdVdTdWdTdTdTd@dYdWdZdWdZd:dTdWdWdWdWd[dTdTdWd]d^dId`œ)d{dx„ƒZXe(eJjUdxd|d}e7dle7dmdndoƒejVdd!ejVdddddddddddddddddejVdejVdddddd!ddpddqejWdddddrddsdeKd%dddejVdeœ0dHdNdNdOdPdQdRdSdTd:d@dTdTdTdTdvdVdTdWdTdTdTd@dYdWdZdWdZd:dTdWdWdWdWd[dZdTdTdWd]d^dIdtœ*d~dx„ƒZXd!dd"ejVdœdHd€dd:d^dId‚œdƒd„„ZYGd…d_„d_ejZƒZ[d_d†œd‡dˆ„Z\d§dTd‰œdŠd‹„Z]dŒd„Z^dŽd„Z_d[dNdTdSdNddPd‘d^d’œ    d“d”„Z`d‘d•d–œd—d˜„Zad™Zbdšd9d›œdœd„Zcdšd‘d‘džœdŸd „Zdd‘d9d–œd¡d¢„ZedS)¨z’
Module contains tools for processing files into DataFrames or other objects
 
GH#48849 provides a convenient way of deprecating keyword arguments
é)Ú annotations)ÚabcN)Úfill)Ú TracebackType)ÚIOÚAnyÚCallableÚHashableÚLiteralÚ
NamedTupleÚSequenceÚoverload)Úlib)Ú STR_NA_VALUES)ÚCompressionOptionsÚ    CSVEngineÚDtypeArgÚ DtypeBackendÚFilePathÚ
IndexLabelÚ ReadCsvBufferÚStorageOptions)ÚAbstractMethodErrorÚ ParserWarning)ÚAppender)Úfind_stack_level)Úcheck_dtype_backend)Ú is_file_likeÚis_floatÚ
is_integerÚ is_list_like)Ú    DataFrame)Ú
RangeIndex)Ú _shared_docs)Ú    IOHandlesÚ
get_handleÚstringify_pathÚvalidate_header_arg)ÚArrowParserWrapper)Ú
ParserBaseÚ is_index_colÚparser_defaults)ÚCParserWrapper)ÚFixedWidthFieldParserÚ PythonParseraá
{summary}
 
Also supports optionally iterating or breaking of the file
into chunks.
 
Additional help can be found in the online docs for
`IO Tools <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html>`_.
 
Parameters
----------
filepath_or_buffer : str, path object or file-like object
    Any valid string path is acceptable. The string could be a URL. Valid
    URL schemes include http, ftp, s3, gs, and file. For file URLs, a host is
    expected. A local file could be: file://localhost/path/to/table.csv.
 
    If you want to pass in a path object, pandas accepts any ``os.PathLike``.
 
    By file-like object, we refer to objects with a ``read()`` method, such as
    a file handle (e.g. via builtin ``open`` function) or ``StringIO``.
sep : str, default {_default_sep}
    Delimiter to use. If sep is None, the C engine cannot automatically detect
    the separator, but the Python parsing engine can, meaning the latter will
    be used and automatically detect the separator by Python's builtin sniffer
    tool, ``csv.Sniffer``. In addition, separators longer than 1 character and
    different from ``'\s+'`` will be interpreted as regular expressions and
    will also force the use of the Python parsing engine. Note that regex
    delimiters are prone to ignoring quoted data. Regex example: ``'\r\t'``.
delimiter : str, default ``None``
    Alias for sep.
header : int, list of int, None, default 'infer'
    Row number(s) to use as the column names, and the start of the
    data.  Default behavior is to infer the column names: if no names
    are passed the behavior is identical to ``header=0`` and column
    names are inferred from the first line of the file, if column
    names are passed explicitly then the behavior is identical to
    ``header=None``. Explicitly pass ``header=0`` to be able to
    replace existing names. The header can be a list of integers that
    specify row locations for a multi-index on the columns
    e.g. [0,1,3]. Intervening rows that are not specified will be
    skipped (e.g. 2 in this example is skipped). Note that this
    parameter ignores commented lines and empty lines if
    ``skip_blank_lines=True``, so ``header=0`` denotes the first line of
    data rather than the first line of the file.
names : array-like, optional
    List of column names to use. If the file contains a header row,
    then you should explicitly pass ``header=0`` to override the column names.
    Duplicates in this list are not allowed.
index_col : int, str, sequence of int / str, or False, optional, default ``None``
  Column(s) to use as the row labels of the ``DataFrame``, either given as
  string name or column index. If a sequence of int / str is given, a
  MultiIndex is used.
 
  Note: ``index_col=False`` can be used to force pandas to *not* use the first
  column as the index, e.g. when you have a malformed file with delimiters at
  the end of each line.
usecols : list-like or callable, optional
    Return a subset of the columns. If list-like, all elements must either
    be positional (i.e. integer indices into the document columns) or strings
    that correspond to column names provided either by the user in `names` or
    inferred from the document header row(s). If ``names`` are given, the document
    header row(s) are not taken into account. For example, a valid list-like
    `usecols` parameter would be ``[0, 1, 2]`` or ``['foo', 'bar', 'baz']``.
    Element order is ignored, so ``usecols=[0, 1]`` is the same as ``[1, 0]``.
    To instantiate a DataFrame from ``data`` with element order preserved use
    ``pd.read_csv(data, usecols=['foo', 'bar'])[['foo', 'bar']]`` for columns
    in ``['foo', 'bar']`` order or
    ``pd.read_csv(data, usecols=['foo', 'bar'])[['bar', 'foo']]``
    for ``['bar', 'foo']`` order.
 
    If callable, the callable function will be evaluated against the column
    names, returning names where the callable function evaluates to True. An
    example of a valid callable argument would be ``lambda x: x.upper() in
    ['AAA', 'BBB', 'DDD']``. Using this parameter results in much faster
    parsing time and lower memory usage.
dtype : Type name or dict of column -> type, optional
    Data type for data or columns. E.g. {{'a': np.float64, 'b': np.int32,
    'c': 'Int64'}}
    Use `str` or `object` together with suitable `na_values` settings
    to preserve and not interpret dtype.
    If converters are specified, they will be applied INSTEAD
    of dtype conversion.
 
    .. versionadded:: 1.5.0
 
        Support for defaultdict was added. Specify a defaultdict as input where
        the default determines the dtype of the columns which are not explicitly
        listed.
engine : {{'c', 'python', 'pyarrow'}}, optional
    Parser engine to use. The C and pyarrow engines are faster, while the python engine
    is currently more feature-complete. Multithreading is currently only supported by
    the pyarrow engine.
 
    .. versionadded:: 1.4.0
 
        The "pyarrow" engine was added as an *experimental* engine, and some features
        are unsupported, or may not work correctly, with this engine.
converters : dict, optional
    Dict of functions for converting values in certain columns. Keys can either
    be integers or column labels.
true_values : list, optional
    Values to consider as True in addition to case-insensitive variants of "True".
false_values : list, optional
    Values to consider as False in addition to case-insensitive variants of "False".
skipinitialspace : bool, default False
    Skip spaces after delimiter.
skiprows : list-like, int or callable, optional
    Line numbers to skip (0-indexed) or number of lines to skip (int)
    at the start of the file.
 
    If callable, the callable function will be evaluated against the row
    indices, returning True if the row should be skipped and False otherwise.
    An example of a valid callable argument would be ``lambda x: x in [0, 2]``.
skipfooter : int, default 0
    Number of lines at bottom of file to skip (Unsupported with engine='c').
nrows : int, optional
    Number of rows of file to read. Useful for reading pieces of large files.
na_values : scalar, str, list-like, or dict, optional
    Additional strings to recognize as NA/NaN. If dict passed, specific
    per-column NA values.  By default the following values are interpreted as
    NaN: 'z', 'éFz    )Úsubsequent_indenta;)'.
keep_default_na : bool, default True
    Whether or not to include the default NaN values when parsing the data.
    Depending on whether `na_values` is passed in, the behavior is as follows:
 
    * If `keep_default_na` is True, and `na_values` are specified, `na_values`
      is appended to the default NaN values used for parsing.
    * If `keep_default_na` is True, and `na_values` are not specified, only
      the default NaN values are used for parsing.
    * If `keep_default_na` is False, and `na_values` are specified, only
      the NaN values specified `na_values` are used for parsing.
    * If `keep_default_na` is False, and `na_values` are not specified, no
      strings will be parsed as NaN.
 
    Note that if `na_filter` is passed in as False, the `keep_default_na` and
    `na_values` parameters will be ignored.
na_filter : bool, default True
    Detect missing value markers (empty strings and the value of na_values). In
    data without any NAs, passing na_filter=False can improve the performance
    of reading a large file.
verbose : bool, default False
    Indicate number of NA values placed in non-numeric columns.
skip_blank_lines : bool, default True
    If True, skip over blank lines rather than interpreting as NaN values.
parse_dates : bool or list of int or names or list of lists or dict, default False
    The behavior is as follows:
 
    * boolean. If True -> try parsing the index.
    * list of int or names. e.g. If [1, 2, 3] -> try parsing columns 1, 2, 3
      each as a separate date column.
    * list of lists. e.g.  If [[1, 3]] -> combine columns 1 and 3 and parse as
      a single date column.
    * dict, e.g. {{'foo' : [1, 3]}} -> parse columns 1, 3 as date and call
      result 'foo'
 
    If a column or index cannot be represented as an array of datetimes,
    say because of an unparsable value or a mixture of timezones, the column
    or index will be returned unaltered as an object data type. For
    non-standard datetime parsing, use ``pd.to_datetime`` after
    ``pd.read_csv``.
 
    Note: A fast-path exists for iso8601-formatted dates.
infer_datetime_format : bool, default False
    If True and `parse_dates` is enabled, pandas will attempt to infer the
    format of the datetime strings in the columns, and if it can be inferred,
    switch to a faster method of parsing them. In some cases this can increase
    the parsing speed by 5-10x.
 
    .. deprecated:: 2.0.0
        A strict version of this argument is now the default, passing it has no effect.
 
keep_date_col : bool, default False
    If True and `parse_dates` specifies combining multiple columns then
    keep the original columns.
date_parser : function, optional
    Function to use for converting a sequence of string columns to an array of
    datetime instances. The default uses ``dateutil.parser.parser`` to do the
    conversion. Pandas will try to call `date_parser` in three different ways,
    advancing to the next if an exception occurs: 1) Pass one or more arrays
    (as defined by `parse_dates`) as arguments; 2) concatenate (row-wise) the
    string values from the columns defined by `parse_dates` into a single array
    and pass that; and 3) call `date_parser` once for each row using one or
    more strings (corresponding to the columns defined by `parse_dates`) as
    arguments.
 
    .. deprecated:: 2.0.0
       Use ``date_format`` instead, or read in as ``object`` and then apply
       :func:`to_datetime` as-needed.
date_format : str or dict of column -> format, default ``None``
   If used in conjunction with ``parse_dates``, will parse dates according to this
   format. For anything more complex,
   please read in as ``object`` and then apply :func:`to_datetime` as-needed.
 
   .. versionadded:: 2.0.0
dayfirst : bool, default False
    DD/MM format dates, international and European format.
cache_dates : bool, default True
    If True, use a cache of unique, converted dates to apply the datetime
    conversion. May produce significant speed-up when parsing duplicate
    date strings, especially ones with timezone offsets.
 
iterator : bool, default False
    Return TextFileReader object for iteration or getting chunks with
    ``get_chunk()``.
 
    .. versionchanged:: 1.2
 
       ``TextFileReader`` is a context manager.
chunksize : int, optional
    Return TextFileReader object for iteration.
    See the `IO Tools docs
    <https://pandas.pydata.org/pandas-docs/stable/io.html#io-chunking>`_
    for more information on ``iterator`` and ``chunksize``.
 
    .. versionchanged:: 1.2
 
       ``TextFileReader`` is a context manager.
{decompression_options}
 
    .. versionchanged:: 1.4.0 Zstandard support.
 
thousands : str, optional
    Thousands separator.
decimal : str, default '.'
    Character to recognize as decimal point (e.g. use ',' for European data).
lineterminator : str (length 1), optional
    Character to break file into lines. Only valid with C parser.
quotechar : str (length 1), optional
    The character used to denote the start and end of a quoted item. Quoted
    items can include the delimiter and it will be ignored.
quoting : int or csv.QUOTE_* instance, default 0
    Control field quoting behavior per ``csv.QUOTE_*`` constants. Use one of
    QUOTE_MINIMAL (0), QUOTE_ALL (1), QUOTE_NONNUMERIC (2) or QUOTE_NONE (3).
doublequote : bool, default ``True``
   When quotechar is specified and quoting is not ``QUOTE_NONE``, indicate
   whether or not to interpret two consecutive quotechar elements INSIDE a
   field as a single ``quotechar`` element.
escapechar : str (length 1), optional
    One-character string used to escape other characters.
comment : str, optional
    Indicates remainder of line should not be parsed. If found at the beginning
    of a line, the line will be ignored altogether. This parameter must be a
    single character. Like empty lines (as long as ``skip_blank_lines=True``),
    fully commented lines are ignored by the parameter `header` but not by
    `skiprows`. For example, if ``comment='#'``, parsing
    ``#empty\na,b,c\n1,2,3`` with ``header=0`` will result in 'a,b,c' being
    treated as the header.
encoding : str, optional, default "utf-8"
    Encoding to use for UTF when reading/writing (ex. 'utf-8'). `List of Python
    standard encodings
    <https://docs.python.org/3/library/codecs.html#standard-encodings>`_ .
 
    .. versionchanged:: 1.2
 
       When ``encoding`` is ``None``, ``errors="replace"`` is passed to
       ``open()``. Otherwise, ``errors="strict"`` is passed to ``open()``.
       This behavior was previously only the case for ``engine="python"``.
 
    .. versionchanged:: 1.3.0
 
       ``encoding_errors`` is a new argument. ``encoding`` has no longer an
       influence on how encoding errors are handled.
 
encoding_errors : str, optional, default "strict"
    How encoding errors are treated. `List of possible values
    <https://docs.python.org/3/library/codecs.html#error-handlers>`_ .
 
    .. versionadded:: 1.3.0
 
dialect : str or csv.Dialect, optional
    If provided, this parameter will override values (default or not) for the
    following parameters: `delimiter`, `doublequote`, `escapechar`,
    `skipinitialspace`, `quotechar`, and `quoting`. If it is necessary to
    override values, a ParserWarning will be issued. See csv.Dialect
    documentation for more details.
on_bad_lines : {{'error', 'warn', 'skip'}} or callable, default 'error'
    Specifies what to do upon encountering a bad line (a line with too many fields).
    Allowed values are :
 
        - 'error', raise an Exception when a bad line is encountered.
        - 'warn', raise a warning when a bad line is encountered and skip that line.
        - 'skip', skip bad lines without raising or warning when they are encountered.
 
    .. versionadded:: 1.3.0
 
    .. versionadded:: 1.4.0
 
        - callable, function with signature
          ``(bad_line: list[str]) -> list[str] | None`` that will process a single
          bad line. ``bad_line`` is a list of strings split by the ``sep``.
          If the function returns ``None``, the bad line will be ignored.
          If the function returns a new list of strings with more elements than
          expected, a ``ParserWarning`` will be emitted while dropping extra elements.
          Only supported when ``engine="python"``
 
delim_whitespace : bool, default False
    Specifies whether or not whitespace (e.g. ``' '`` or ``'    '``) will be
    used as the sep. Equivalent to setting ``sep='\s+'``. If this option
    is set to True, nothing should be passed in for the ``delimiter``
    parameter.
low_memory : bool, default True
    Internally process the file in chunks, resulting in lower memory use
    while parsing, but possibly mixed type inference.  To ensure no mixed
    types either set False, or specify the type with the `dtype` parameter.
    Note that the entire file is read into a single DataFrame regardless,
    use the `chunksize` or `iterator` parameter to return the data in chunks.
    (Only valid with C parser).
memory_map : bool, default False
    If a filepath is provided for `filepath_or_buffer`, map the file object
    directly onto memory and access the data directly from there. Using this
    option can improve performance because there is no longer any I/O overhead.
float_precision : str, optional
    Specifies which converter the C engine should use for floating-point
    values. The options are ``None`` or 'high' for the ordinary converter,
    'legacy' for the original lower precision pandas converter, and
    'round_trip' for the round-trip converter.
 
    .. versionchanged:: 1.2
 
{storage_options}
 
    .. versionadded:: 1.2
 
dtype_backend : {{"numpy_nullable", "pyarrow"}}, defaults to NumPy backed DataFrames
    Which dtype_backend to use, e.g. whether a DataFrame should have NumPy
    arrays, nullable dtypes are used for all dtypes that have a nullable
    implementation when "numpy_nullable" is set, pyarrow is used for all
    dtypes if "pyarrow" is set.
 
    The dtype_backends are still experimential.
 
    .. versionadded:: 2.0
 
Returns
-------
DataFrame or TextFileReader
    A comma-separated values (csv) file is returned as two-dimensional
    data structure with labeled axes.
 
See Also
--------
DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file.
read_csv : Read a comma-separated values (csv) file into DataFrame.
read_fwf : Read a table of fixed-width formatted lines into DataFrame.
 
Examples
--------
>>> pd.{func_name}('data.csv')  # doctest: +SKIP
FT)Údelim_whitespaceÚ    na_filterÚ
low_memoryÚ
memory_mapÚfloat_precisionÚinferéd)ÚcolspecsÚ infer_nrowsÚwidthsÚ
skipfooterr3r5Ú    chunksizeÚcommentÚnrowsÚ    thousandsr4ÚdialectÚ on_bad_linesr1ÚquotingÚlineterminatorÚ
convertersÚiteratorÚdayfirstÚverboseÚskipinitialspacec@seZdZUded<ded<dS)Ú_DeprecationConfigrÚ default_valueú
str | NoneÚmsgN)Ú__name__Ú
__module__Ú __qualname__Ú__annotations__©rQrQúPd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/io/parsers/readers.pyrIÒs
rI.ÚNoneÚint)ÚvalÚmin_valÚreturncCsdS©NrQ©ÚnamerUrVrQrQrRÚvalidate_integer×sr[ÚfloatcCsdSrXrQrYrQrQrRr[Üsú
int | NonecCsdSrXrQrYrQrQrRr[ászint | float | NonecCsf|dkr |Sd|d›d|d›}t|ƒrFt|ƒ|kr<t|ƒ‚t|ƒ}nt|ƒrV||ks^t|ƒ‚t|ƒS)a½
    Checks whether the 'name' parameter for parsing is either
    an integer OR float that can SAFELY be cast to an integer
    without losing accuracy. Raises a ValueError if that is
    not the case.
 
    Parameters
    ----------
    name : str
        Parameter name (used for error reporting)
    val : int or float
        The value to check
    min_val : int
        Minimum allowed value (val < min_val will result in a ValueError)
    Nú'Úsz' must be an integer >=Úd)rrTÚ
ValueErrorr)rZrUrVrLrQrQrRr[æs 
zSequence[Hashable] | None)ÚnamesrWcCsH|dk    rDt|ƒtt|ƒƒkr$tdƒ‚t|ddsDt|tjƒsDtdƒ‚dS)aZ
    Raise ValueError if the `names` parameter contains duplicates or has an
    invalid data type.
 
    Parameters
    ----------
    names : array-like or None
        An array containing a list of the names used for the output DataFrame.
 
    Raises
    ------
    ValueError
        If names are not unique or are not ordered (e.g. set).
    Nz Duplicate names are not allowed.F)Z
allow_setsz&Names should be an ordered collection.)ÚlenÚsetrar Ú
isinstancerÚKeysView)rbrQrQrRÚ_validate_namess
ÿ
ÿrgz4FilePath | ReadCsvBuffer[bytes] | ReadCsvBuffer[str]zDataFrame | TextFileReader)Úfilepath_or_bufferrWc
Csð| dd¡dkrF| dtj¡tjkr>| dd¡dkr>d|d<nd|d<| dd¡}| dd¡}| d    ¡d
krŠ|rxtd ƒ‚|dk    r–td ƒ‚n td|d ƒ}| dd¡}t| dd¡ƒt|f|Ž}|sÆ|rÊ|S|| |¡W5QR£SQRXdS)zGeneric reader of line files.Ú parse_datesNÚ date_parserÚ date_formatFTrEr<ÚengineÚpyarrowz@The 'iterator' option is not supported with the 'pyarrow' enginezAThe 'chunksize' option is not supported with the 'pyarrow' engineér>rb)ÚgetrÚ
no_defaultrar[rgÚTextFileReaderÚread)rhÚkwdsrEr<r>ÚparserrQrQrRÚ_reads4ÿþ
  ÿÿ   ru)/ÚsepÚ    delimiterÚheaderrbÚ    index_colÚusecolsÚdtyperlrDÚ true_valuesÚ false_valuesrHÚskiprowsr;r>Ú    na_valuesÚkeep_default_nar2rGÚskip_blank_linesriÚinfer_datetime_formatÚ keep_date_colrjrkrFÚ cache_datesr<Ú compressionr?ÚdecimalrCÚ    quotecharrBÚ doublequoteÚ
escapecharr=ÚencodingÚencoding_errorsr@rAr1r3r4r5Ústorage_optionsÚ dtype_backendzstr | None | lib.NoDefaultz-int | Sequence[int] | None | Literal['infer']z)Sequence[Hashable] | None | lib.NoDefaultz"IndexLabel | Literal[False] | NonezDtypeArg | NoneúCSVEngine | NoneÚboolz bool | Sequence[Hashable] | Nonezbool | lib.NoDefaultrKz Literal[True]rÚstrzstr | csv.Dialect | Nonez"Literal[('high', 'legacy')] | NonerzDtypeBackend | lib.NoDefaultrq))rhrvrwrxrbryr{rlrHr;r>r€r2rGrrir‚rƒrkrFr„rEr<r…r?r†rCr‡rBrˆr‰r=rŠr‹r@r1r4r5rŒrrWc01CsdSrXrQ©1rhrvrwrxrbryrzr{rlrDr|r}rHr~r;r>rr€r2rGrrir‚rƒrjrkrFr„rEr<r…r?r†rCr‡rBrˆr‰r=rŠr‹r@rAr1r3r4r5rŒrrQrQrRÚread_csvKs5r’)/rvrwrxrbryrzr{rlrDr|r}rHr~r;r>rr€r2rGrrir‚rƒrjrkrFr„rEr…r?r†rCr‡rBrˆr‰r=rŠr‹r@rAr1r3r4r5rŒrc01CsdSrXrQr‘rQrQrRr’„s5)0rvrwrxrbryrzr{rlrDr|r}rHr~r;r>rr€r2rGrrir‚rƒrjrkrFr„rEr<r…r?r†rCr‡rBrˆr‰r=rŠr‹r@rAr1r3r4r5rŒrzLiteral[False]r!c01CsdSrXrQr‘rQrQrRr’½s5c01CsdSrXrQr‘rQrQrRr’ös5z8Read a comma-separated values (csv) file into DataFrame.z','rŒÚdecompression_optionsrh)Ú    func_nameÚsummaryZ _default_seprŒr“Ú.ú"ÚstrictÚerror)*rhrvrwrxrbryr{rlrHr;r>r€r2rGrrir‚rƒrkrFr„rEr<r…r?r†rCr‡rBrˆr‰r=rŠr‹r@rAr1r4r5rŒrrWc03 Csd|tjk    rtjdttƒdtƒ ¡}1|1d=|1d=t|)||+|||*|ddi|0d    }2|1     |2¡t
||1ƒS)NúùThe argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.©Ú
stacklevelrhrvrwú,©Údefaultsr© rrpÚwarningsÚwarnÚ FutureWarningrÚlocalsÚcopyÚ_refine_defaults_readÚupdateru©3rhrvrwrxrbryrzr{rlrDr|r}rHr~r;r>rr€r2rGrrir‚rƒrjrkrFr„rEr<r…r?r†rCr‡rBrˆr‰r=rŠr‹r@rAr1r3r4r5rŒrrsZ kwds_defaultsrQrQrRr’.s,F
ù
 
÷
zbool | Sequence[Hashable]c01CsdSrXrQr‘rQrQrRÚ
read_table”s5r©c01CsdSrXrQr‘rQrQrRr©Ís5c01CsdSrXrQr‘rQrQrRr©s5c01CsdSrXrQr‘rQrQrRr©?s5z+Read general delimited file into DataFrame.z'\\t' (tab-stop)c03 Csd|tjk    rtjdttƒdtƒ ¡}1|1d=|1d=t|)||+|||*|ddi|0d    }2|1     |2¡t
||1ƒS)Nršr›rhrvrwú    ržr r¨rQrQrRr©ws,F
ù
÷
)r8r:r9rz&Sequence[tuple[int, int]] | str | NonezSequence[int] | None)rhr8r:r9rrWc Ks<|dkr|dkrtdƒ‚|dkr0|dk    r0tdƒ‚|dk    rfgd}}|D]}| |||f¡||7}qF|dk    srt‚| d¡}|dk    r
t|ƒt|ƒkr
|dkr
d}    | d¡dk    rÜ| d¡}
|
d    k    rÜt|
ƒsÔd
}    nt|
ƒ}    | d ¡dkr
t|ƒ|    t|ƒkr
td ƒ‚||d <||d<d|d<t|ƒ||d<t||ƒS)aH    
    Read a table of fixed-width formatted lines into DataFrame.
 
    Also supports optionally iterating or breaking of the file
    into chunks.
 
    Additional help can be found in the `online docs for IO Tools
    <https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html>`_.
 
    Parameters
    ----------
    filepath_or_buffer : str, path object, or file-like object
        String, path object (implementing ``os.PathLike[str]``), or file-like
        object implementing a text ``read()`` function.The string could be a URL.
        Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is
        expected. A local file could be:
        ``file://localhost/path/to/table.csv``.
    colspecs : list of tuple (int, int) or 'infer'. optional
        A list of tuples giving the extents of the fixed-width
        fields of each line as half-open intervals (i.e.,  [from, to[ ).
        String value 'infer' can be used to instruct the parser to try
        detecting the column specifications from the first 100 rows of
        the data which are not being skipped via skiprows (default='infer').
    widths : list of int, optional
        A list of field widths which can be used instead of 'colspecs' if
        the intervals are contiguous.
    infer_nrows : int, default 100
        The number of rows to consider when letting the parser determine the
        `colspecs`.
    dtype_backend : {"numpy_nullable", "pyarrow"}, defaults to NumPy backed DataFrames
        Which dtype_backend to use, e.g. whether a DataFrame should have NumPy
        arrays, nullable dtypes are used for all dtypes that have a nullable
        implementation when "numpy_nullable" is set, pyarrow is used for all
        dtypes if "pyarrow" is set.
 
        The dtype_backends are still experimential.
 
        .. versionadded:: 2.0
 
    **kwds : optional
        Optional keyword arguments can be passed to ``TextFileReader``.
 
    Returns
    -------
    DataFrame or TextFileReader
        A comma-separated values (csv) file is returned as two-dimensional
        data structure with labeled axes.
 
    See Also
    --------
    DataFrame.to_csv : Write DataFrame to a comma-separated values (csv) file.
    read_csv : Read a comma-separated values (csv) file into DataFrame.
 
    Examples
    --------
    >>> pd.read_fwf('data.csv')  # doctest: +SKIP
    Nz&Must specify either colspecs or widths)Nr6z4You must specify only one of 'widths' and 'colspecs'rrbr6ryFrnrzz-Length of colspecs must match length of namesr8r9ú
python-fwfrlr)raÚappendÚAssertionErrorrorcr rru) rhr8r:r9rrsÚcolÚwrbZ    len_indexryrQrQrRÚread_fwfÝs8C
 
 
 
 
&r°c@sÚeZdZdZd0ddddœdd„Zdd    œd
d „Zd d dœdd„Zd ddœdd„Zd d ddœdd„Zdd    œdd„Z    d1dd ddœdd„Z
dd    œdd „Z d2d!dd"œd#d$„Z d3d!dd%œd&d'„Z dd    œd(d)„Zd*d+d,dd-œd.d/„ZdS)4rqzF
 
    Passed dialect overrides any of the related parser options
 
    Nz;FilePath | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | listrŽrS)ÚfrlrWcKs|dk    rd}nd}d}||_| d|¡|_t|ƒt|ƒ}|dk    r\|dkrRtdƒ‚t||ƒ}| dd¡dkr†| d    ¡dkr~d
nd|d<||_d
|_|     |¡}| d d¡|d <| 
d d¡|_ | 
d d¡|_ |  ||¡| ||¡\|_|_d|krþ|d|jd<d|_| ||j¡|_dS)NTÚpythonFÚengine_specifiedrmz?The 'dialect' option is not supported with the 'pyarrow' enginerxr6rbrrŒr<r>Zhas_index_names)rlroÚ_engine_specifiedÚ_validate_skipfooterÚ_extract_dialectraÚ_merge_with_dialect_propertiesÚ orig_optionsÚ_currowÚ_get_options_with_defaultsÚpopr<r>Ú_check_file_or_bufferÚ_clean_optionsÚoptionsÚhandlesÚ _make_engineÚ_engine)Úselfr±rlrsr³r@r¾rQrQrRÚ__init__Rs8ÿ
 
 zTextFileReader.__init__©rWcCs"|jdk    r|j ¡|j ¡dSrX)r¿ÚcloserÁ©rÂrQrQrRrŁs
 
zTextFileReader.closerúdict[str, Any])rlrWcCs |j}i}t ¡D]X\}}| ||¡}|dkrb|tkrb||krb|t|d|ƒkrbtdt|ƒ›dƒ‚|||<qt ¡D]f\}}||krÎ||}|dkrÒ||krÒd|kr®|t    kr®qÒtdt|ƒ›dt|ƒ›dƒ‚n|}|||<qt|d    krt
 ¡D]\}}| ||¡||<qî|S)
NrmÚvaluezThe z2 option is not supported with the 'pyarrow' engineÚcr²z" option is not supported with the z enginer«) r¸r+ÚitemsroÚ_pyarrow_unsupportedÚgetattrraÚreprÚ_c_parser_defaultsÚ_python_unsupportedÚ _fwf_defaults)rÂrlrsr¾ÚargnameÚdefaultrÈrQrQrRrº†s> ÿþýüÿ
ÿ
 
z)TextFileReader._get_options_with_defaultscCs&t|ƒr"|dkr"t|dƒs"tdƒ‚dS)NrÉÚ__iter__z<The 'python' engine cannot iterate through this file buffer.)rÚhasattrra)rÂr±rlrQrQrRr¼²sÿz$TextFileReader._check_file_or_bufferz tuple[dict[str, Any], CSVEngine])r¾rlrWcCs| ¡}d}|dkr(|ddkr(d}d}|d}|d}|dkr^|s^|dkr\d    |›d
}d}nÚ|dk    r¬t|ƒd kr¬|dkr’|d kr’d |d<|d=n|dkrªd    |›d}d}nŒ|rÂd|krÀd |d<nv|dk    r8d }t ¡pÚd}zt| |¡ƒd krôd}Wntk
rd}YnX|s8|dkr8d|›d|›d}d}|d}    |    dk    rt|    ttfƒrt|    ƒd krt    |    ƒdkr|dkrd|›d}d}|r¦|j
r¦t |ƒ‚|dkrÂt D] }
||
=q´d|krt D]>}
|r||
t|
krt d|›dt|
ƒ›dƒ‚||
=qÐ|r0tjd|›dttƒd|d} |d} |d } |d!}|d"}t|d#ƒ| d krvt d$ƒ‚t| ƒršt| tttjfƒsš| g} | |d<| dk    r´t| ƒn| } | dk    rät| tƒsètd%t| ƒj›ƒ‚ni} |d&}t||ƒ\}}|d'kr&t|ƒs`|dk    r`t d(ƒ‚n:t|ƒr<tt |ƒƒ}|dkrNt!ƒ}nt"|ƒs`t!|ƒ}| |d<| |d <||d!<||d)<||d"<||fS)*NrÉr;rz*the 'c' engine does not support skipfooterr²rwr1)rÉrmzthe 'z>' engine does not support sep=None with delim_whitespace=Falsernz\s+T)r²r«zr' engine does not support regex separators (separators > 1 char and different from '\s+' are interpreted as regex)úutf-8Fzthe separator encoded in z is > 1 char long, and the 'z)' engine does not support such separatorsr‡ézNord(quotechar) > 127, meaning the quotechar is larger than one byte, and the 'z)' engine does not support such quotecharsz,Falling back to the 'python' engine because z, but this causes z= to be ignored as it is not supported by the 'python' engine.z;; you can avoid this warning by specifying engine='python'.r›ryrbrDrr~rxz)The value of index_col couldn't be 'True'z8Type converters must be a dict or subclass, input was a r€rmz@skiprows argument must be an integer when using engine='pyarrow'Ú
na_fvalues)#r¥rcÚsysÚgetfilesystemencodingÚencodeÚUnicodeDecodeErrorrerÚbytesÚordr´raÚ_c_unsupportedrÏrÎrÍr¡r¢rrr'r*ÚlistÚtupleÚnpZndarrayÚdictÚ    TypeErrorÚtyperMÚ_clean_na_valuesrÚrangerdÚcallable)rÂr¾rlÚresultZfallback_reasonrvr1Z
encodeablerŠr‡ÚargryrbrDrr~r€r×rQrQrRr½½sÎ  
ÿ
ÿ
 
 
ÿ
ÿ
þý
ÿ
 
 
ÿ
 
ù
 
 
 
 ÿ
ÿ
 
 
zTextFileReader._clean_optionsr!cCs.z
| ¡WStk
r(| ¡‚YnXdSrX)Ú    get_chunkÚ StopIterationrÅrÆrQrQrRÚ__next__Vs
 
zTextFileReader.__next__rÉz@FilePath | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | list | IOr)c Cs\ttttdœ}||kr0td|›d| ¡›dƒ‚t|tƒsôd}d}|dkrTd}d    }n<|d
kr|j     d d ¡d krtt
|ƒt ƒrd}d |kr|d 7}t |||j     d d¡|j     dd¡|j     dd¡||j     dd¡|j     dd¡d|_ |j dk    sêt‚|j j}n |dkrdt|ƒ›}t|ƒ‚z|||f|jŽWStk
rV|j dk    rP|j  ¡‚YnXdS)N)rÉr²rmr«zUnknown engine: z (valid options are ú)TÚrrmFÚrbrÉrŠrÕÚbr…r4r‹r˜rŒ)rŠr…r4Úis_textÚerrorsrŒr²z)Invalid file path or buffer object type: )r,r.r(r-raÚkeysrerßr¾ror&rr%r¿r­ÚhandleräÚ    ExceptionrÅ)rÂr±rlÚmappingrñÚmoderLrQrQrRrÀ]sZüÿ
ÿþ ý     ø
 
 
 
zTextFileReader._make_enginecCs t|ƒ‚dSrX)rrÆrQrQrRÚ_failover_to_python•sz"TextFileReader._failover_to_pythonr])r>rWcCsÜ|jdkr:z|j ¡}WqØtk
r6| ¡‚YqØXnžtd|ƒ}z|j |¡\}}}Wntk
rx| ¡‚YnX|dkr´|r®ttt|     ¡ƒƒƒ}t
|j |j |ƒ}q¼d}nt|ƒ}t |||d}|j |7_ |S)Nrmr>r)ÚcolumnsÚindex) rlrÁrrrõrÅr[rcÚnextÚiterÚvaluesr"r¹r!)rÂr>ZdfrúrùZcol_dictZnew_rowsrQrQrRrr˜s8
 
 
ÿüýzTextFileReader.read)ÚsizerWcCsF|dkr|j}|jdk    r:|j|jkr(t‚t||j|jƒ}|j|dS)N)r>)r<r>r¹rëÚminrr)rÂrþrQrQrRrê¾s
 zTextFileReader.get_chunkcCs|SrXrQrÆrQrQrRÚ    __enter__ÇszTextFileReader.__enter__ztype[BaseException] | NonezBaseException | NonezTracebackType | None)Úexc_typeÚ    exc_valueÚ    tracebackrWcCs | ¡dSrX)rÅ)rÂrrrrQrQrRÚ__exit__ÊszTextFileReader.__exit__)N)rÉ)N)N)rMrNrOÚ__doc__rÃrÅrºr¼r½rìrÀrørrrêrrrQrQrQrRrqKs     ý/, 
ý8&    rÄcOsd|d<t||ŽS)a¤
    Converts lists of lists/tuples into DataFrames with proper type inference
    and optional (e.g. string to datetime) conversion. Also enables iterating
    lazily over chunks of large files
 
    Parameters
    ----------
    data : file-like object or list
    delimiter : separator character to use
    dialect : str or csv.Dialect instance, optional
        Ignored if delimiter is longer than 1 character
    names : sequence, default
    header : int, default 0
        Row to use to parse column labels. Defaults to the first row. Prior
        rows will be discarded
    index_col : int or list, optional
        Column or columns to use as the (possibly hierarchical) index
    has_index_names: bool, default False
        True if the cols defined in index_col have an index name and are
        not in the header.
    na_values : scalar, str, list-like, or dict, optional
        Additional strings to recognize as NA/NaN.
    keep_default_na : bool, default True
    thousands : str, optional
        Thousands separator
    comment : str, optional
        Comment out remainder of line
    parse_dates : bool, default False
    keep_date_col : bool, default False
    date_parser : function, optional
 
        .. deprecated:: 2.0.0
    date_format : str or dict of column -> format, default ``None``
 
        .. versionadded:: 2.0.0
    skiprows : list of integers
        Row numbers to skip
    skipfooter : int
        Number of line at bottom of file to skip
    converters : dict, optional
        Dict of functions for converting values in certain columns. Keys can
        either be integers or column labels, values are functions that take one
        input argument, the cell (not column) content, and return the
        transformed content.
    encoding : str, optional
        Encoding to use for UTF when reading/writing (ex. 'utf-8')
    float_precision : str, optional
        Specifies which converter the C engine should use for floating-point
        values. The options are `None` or `high` for the ordinary converter,
        `legacy` for the original lower precision pandas converter, and
        `round_trip` for the round-trip converter.
 
        .. versionchanged:: 1.2
    r²rl)rq)ÚargsrsrQrQrRÚ
TextParserÓs7r)r€cCs´|dkr |rt}ntƒ}tƒ}nŒt|tƒr‚| ¡}i}| ¡D].\}}t|ƒsT|g}|rdt|ƒtB}|||<q>dd„| ¡Dƒ}n*t|ƒs|g}t|ƒ}|r¤|tB}t|ƒ}||fS)NcSsi|]\}}|t|ƒ“qSrQ)Ú_floatify_na_values)Ú.0ÚkÚvrQrQrRÚ
<dictcomp>&sz$_clean_na_values.<locals>.<dictcomp>)    rrdrerâr¥rÊr Ú_stringify_na_valuesr)rr€r×Z old_na_valuesr
r rQrQrRrås,
 
råc CsPtƒ}|D]@}z t|ƒ}t |¡s,| |¡Wq
tttfk
rHYq
Xq
|SrX)rdr\ráÚisnanÚaddrãraÚ OverflowError)rrèr rQrQrRr3s
rc CsÀg}|D]®}| t|ƒ¡| |¡zHt|ƒ}|t|ƒkr`t|ƒ}| |›d¡| t|ƒ¡| |¡Wntttfk
r†YnXz| t|ƒ¡Wqtttfk
r´YqXqt|ƒS)z1return a stringified and numeric for these valuesz.0)r¬rr\rTrãrarrd)rrèÚxr rQrQrRr @s$
 r zstr | CallablerÇ)    r@rwr1rlrvrArbrŸrc     Cs\|d}    i}
|dk    r2|dko,|tjkp,||    k|
d<|rH|tjk    rHtdƒ‚|tjkrVdn||
d<|dkrj|}|r€|tjk    r€tdƒ‚|dkrtdƒ‚|tjkr¤|    |
d<n||
d<|dk    r¾d    |
d
<nd |
d <d |
d
<|dkrätjj|
d<nd|dkrútjj|
d<nN|dkrtjj|
d<n6t|ƒr8|dkr.tdƒ‚||
d<ntd|›dƒ‚t    |ƒ||
d<|
S)aÌValidate/refine default values of input parameters of read_csv, read_table.
 
    Parameters
    ----------
    dialect : str or csv.Dialect
        If provided, this parameter will override values (default or not) for the
        following parameters: `delimiter`, `doublequote`, `escapechar`,
        `skipinitialspace`, `quotechar`, and `quoting`. If it is necessary to
        override values, a ParserWarning will be issued. See csv.Dialect
        documentation for more details.
    delimiter : str or object
        Alias for sep.
    delim_whitespace : bool
        Specifies whether or not whitespace (e.g. ``' '`` or ``'    '``) will be
        used as the sep. Equivalent to setting ``sep='\s+'``. If this option
        is set to True, nothing should be passed in for the ``delimiter``
        parameter.
    engine : {{'c', 'python'}}
        Parser engine to use. The C engine is faster while the python engine is
        currently more feature-complete.
    sep : str or object
        A delimiter provided by the user (str) or a sentinel value, i.e.
        pandas._libs.lib.no_default.
    on_bad_lines : str, callable
        An option for handling bad lines or a sentinel value(None).
    names : array-like, optional
        List of column names to use. If the file contains a header row,
        then you should explicitly pass ``header=0`` to override the column names.
        Duplicates in this list are not allowed.
    defaults: dict
        Default values of input parameters.
 
    Returns
    -------
    kwds : dict
        Input parameters with correct values.
 
    Raises
    ------
    ValueError :
        If a delimiter was specified with ``sep`` (or ``delimiter``) and
        ``delim_whitespace=True``.
    rwNÚ sep_overridez:Specified a sep and a delimiter; you can only specify one.rbzXSpecified a delimiter with both sep and delim_whitespace=True; you can only specify one.Ú
z¯Specified \n as separator or delimiter. This forces the python engine which does not accept a line terminator. Hence it is not allowed to use the line terminator as separator.Tr³rÉrlFr™rAr¢Úskipr²z>on_bad_line can only be a callable function if engine='python'z    Argument z is invalid for on_bad_linesr)
rrprar)ZBadLineHandleMethodÚERRORÚWARNZSKIPrçr) r@rwr1rlrvrArbrŸrZ delim_defaultrsrQrQrRr¦YsT7 ÿÿÿ
 
 
 
 
 
ÿ
r¦zcsv.Dialect | None)rsrWcCs<| d¡dkrdS|d}|t ¡kr0t |¡}t|ƒ|S)za
    Extract concrete csv dialect instance.
 
    Returns
    -------
    csv.Dialect or None
    r@N)roÚcsvÚ list_dialectsÚ get_dialectÚ_validate_dialect)rsr@rQrQrRr¶Ûs 
r¶)rwrˆr‰rHr‡rBz csv.Dialect)r@rWcCs(tD]}t||ƒstd|›dƒ‚qdS)zx
    Validate csv dialect instance.
 
    Raises
    ------
    ValueError
        If incorrect dialect is provided.
    zInvalid dialect z     providedN)ÚMANDATORY_DIALECT_ATTRSrÔra)r@ÚparamrQrQrRrùs    
r)r@rŸrWc    Csž| ¡}tD]Œ}t||ƒ}t|}| ||¡}g}|||fkrtd|›d|›d|›d}|dkrj| dd¡st| |¡|rtjd     |¡t
t ƒd    |||<q |S)
a„
    Merge default kwargs in TextFileReader with dialect parameters.
 
    Parameters
    ----------
    dialect : csv.Dialect
        Concrete csv dialect. See csv.Dialect documentation for more details.
    defaults : dict
        Keyword arguments passed to TextFileReader.
 
    Returns
    -------
    kwds : dict
        Updated keyword arguments, merged with dialect parameters.
    zConflicting values for 'z': 'z+' was provided, but the dialect specifies 'z%'. Using the dialect-specified value.rwrFz
 
r›) r¥rrÌr+ror»r¬r¡r¢Újoinrr)    r@rŸrsrZ dialect_valZparser_defaultÚprovidedZ conflict_msgsrLrQrQrRr·s&
  ÿ    
ÿ
r·cCs<| d¡r8| d¡s| d¡r&tdƒ‚| d¡r8tdƒ‚dS)a
    Check whether skipfooter is compatible with other kwargs in TextFileReader.
 
    Parameters
    ----------
    kwds : dict
        Keyword arguments passed to TextFileReader.
 
    Raises
    ------
    ValueError
        If skipfooter is not compatible with other parameters.
    r;rEr<z('skipfooter' not supported for iterationr>z''skipfooter' not supported with 'nrows'N)rora)rsrQrQrRrµ=s
 
 
rµ).).).)r)T)frÚ
__future__rÚ collectionsrrrØÚtextwraprÚtypesrÚtypingrrrr    r
r r r r¡ÚnumpyráZ pandas._libsrZpandas._libs.parsersrZpandas._typingrrrrrrrrZ pandas.errorsrrZpandas.util._decoratorsrZpandas.util._exceptionsrZpandas.util._validatorsrZpandas.core.dtypes.commonrrrr Zpandas.core.framer!Zpandas.core.indexes.apir"Zpandas.core.shared_docsr#Zpandas.io.commonr$r%r&r'Z&pandas.io.parsers.arrow_parser_wrapperr(Zpandas.io.parsers.base_parserr)r*r+Z"pandas.io.parsers.c_parser_wrapperr,Zpandas.io.parsers.python_parserr-r.rÚsortedZ_doc_read_csv_and_tablerÎrÐrÞrÏrËrIr[rgrur’ÚformatrpÚ QUOTE_MINIMALr©r°ÚIteratorrqrrårr r¦r¶rrr·rµrQrQrQrRÚ<module>s¾    (
  (
        y‡z†ÿgû î/Îd8Îd8Îd8Îd7ÿûÿ Æf\Îd8Îd8Îd8Îd7ÿûÿ Æf_ún ;% 
6