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
Ë
oñúh¸#ãój—ddlmZddlZddlZddlmZddlmZddlm    Z    m
Z
ddl m Z Gd„d«ZGd„d    e«ZGd
„d e«ZGd „d e«ZGd„de«ZGd„de«Zej(d„«Zej(d„«ZeZeZeZeZegZeegZej:eej<j>ej<jAe d¬«g¬«gZ!ge¢e¢e!¢Z"dgZ#ddgZ$dgZ%ge$¢e#¢e%¢Z&ej(e"e&¬«d„«Z'ej(ee$¬«d„«Z(ej(ee#¬«d„«Z)ej(e!e%¬«d„«Z*d „Z+ej(e+«d!e+«d"¬«d#„«Z,gd$¢Z-gd%¢Z.d&d'gZ/e.Dcgc]}e/D]    }|›|›d(‘Œ Œc}}Z0ej(e-¬)«d*„«Z1ej(e0¬)«d+„«Z2ej(gd,¢¬)«d-„«Z3ej(d.„«Z4ej(d/„«Z5ycc}}w)0é)Ú annotationsN)Ú HAS_PYARROW)ÚVERSIONS)Úread_csvÚ
read_tablecón—eZdZUdZded<dZgZded<d„Zd„Zddd    œ                    dd
„Z    d „Z
dd œ            dd „Z y)Ú
BaseParserNz
str | NoneÚengineTzlist[str | None]Úfloat_precision_choicescóv—|j«}|j|j|jdœ«|S)N)r
Ú
low_memory)ÚcopyÚupdater
r )ÚselfÚkwargss  úRH:\Change_password\venv_build\Lib\site-packages\pandas/tests/io/parser/conftest.pyÚ update_kwargszBaseParser.update_kwargss+€Ø—‘“ˆØ ‰  §¡¸D¿O¹OÑLÔMàˆ ócó:—|j|«}t|i|¤ŽS©N)rr©rÚargsrs   rrzBaseParser.read_csvs"€Ø×#Ñ# FÓ+ˆÜ˜Ð( Ñ(Ð(r)Úraise_on_extra_warningsÚcheck_stacklevelcó˜—|j|«}tj||||¬«5t|i|¤Žcddd«S#1swYyxYw)N)Úmatchrr)rÚtmÚassert_produces_warningr)rÚ    warn_typeÚwarn_msgrrrrs       rÚread_csv_check_warningsz"BaseParser.read_csv_check_warnings sR€ð×#Ñ# FÓ+ˆÜ × 'Ñ 'Ø ØØ$;Ø-ô    
ñ    -ô ˜TÐ, VÑ,÷     -÷    -ò    -ús « AÁA    có:—|j|«}t|i|¤ŽSr)rrrs   rrzBaseParser.read_table5s"€Ø×#Ñ# FÓ+ˆÜ˜4Ð* 6Ñ*Ð*r)rcó–—|j|«}tj|||¬«5t|i|¤Žcddd«S#1swYyxYw)N)rr)rrrr)rrr rrrs      rÚread_table_check_warningsz$BaseParser.read_table_check_warnings9sN€ð×#Ñ# FÓ+ˆÜ × 'Ñ 'Ø ˜XÐ?Vô
ñ    /ô˜tÐ. vÑ.÷    /÷    /ò    /ús    ª ?¿A)rú type[Warning]r ÚstrrÚbool)rr%r r&) Ú__name__Ú
__module__Ú __qualname__r
Ú__annotations__r r rrr!rr$©rrr    r    sq…Ø€FˆJÓØ€JØ02ÐÐ-Ó2òò )ð!%Ø!%ñ -à ð-ðð-ð ó -ò*+ð!%ñ /à ð/ðô/rr    có—eZdZdZgd¢Zy)ÚCParserÚc)NÚhighÚ
round_tripN©r(r)r*r
r r,rrr.r.Ks „Ø €FÚ:Ñrr.có—eZdZdZy)ÚCParserHighMemoryFN©r(r)r*r r,rrr4r4Ps„؁Jrr4có—eZdZdZy)ÚCParserLowMemoryTNr5r,rrr7r7Ts„؁Jrr7có—eZdZdZdgZy)Ú PythonParserÚpythonNr2r,rrr9r9Xs„Ø €FØ#˜fÑrr9có—eZdZdZdgZy)Ú PyArrowParserÚpyarrowNr2r,rrr<r<]s„Ø €FØ#˜fÑrr<có—|ddd«S)zG
    The directory path to the data files needed for parser tests.
    ÚioÚparserÚdatar,©Údatapaths rÚ csv_dir_pathrDbs€ñ
D˜( FÓ +Ð+rcóR—tjj|ddd«d«S)zH
    The path to the data file "test1.csv" needed for parser tests.
    r?rAÚcsvz    test1.csv)ÚosÚpathÚjoinrBs rÚcsv1rJjs"€ô
7‰7<‰<™  v¨uÓ5°{Ó CÐCrúpyarrow is not installed©Úreason©Úmarksr:Úc_highÚc_lowr=©ÚparamsÚidscó¨—|j«}|jdk(r2tjdtd«ddl}|j d«|S)z)
    Fixture all of the CSV parsers.
    r=rNé)Úparamr
ÚpytestÚ importorskiprr=Ú set_cpu_count)Úrequestr@r=s   rÚ all_parsersr\ŒsH€ð
]‰]‹_€FØ ‡}}˜    Ò!Ü×јI¤x°    Ñ':Ô;ó    à×јaÔ Ø €Mrcó"—|j«S)z<
    Fixture all of the CSV parsers using the C engine.
    ©rW©r[s rÚ c_parser_onlyr`œó€ð
=‰=‹?Ðrcó"—|j«S)zA
    Fixture all of the CSV parsers using the Python engine.
    r^r_s rÚpython_parser_onlyrc¤rarcó"—|j«S)zB
    Fixture all of the CSV parsers using the Pyarrow engine.
    r^r_s rÚpyarrow_parser_onlyre¬rarcóЗg}g}ttt«D]Ç\}}t|d«r|jd}|j
D]˜}|j dk(r@tjjtjjt d¬«gnd}tj|«|f|¬«}|j|«|j|›d|›«ŒšŒÉ||d    œS)
za
    Return all allowable parser and float precision
    combinations and corresponding ids.
    Úvaluesrr=rKrLr,rNú-rR)ÚzipÚ _all_parsersÚ_all_parser_idsÚhasattrrgr r
rXÚmarkÚ
single_cpuÚskipifrrWÚappend)rSrTr@Ú    parser_idÚ    precisionrmrWs       rÚ,_get_all_parser_float_precision_combinationsrs´sê€ð
€FØ
€CÜ ¤¬Ó?ò3ш    Ü 6˜8Ô $à—]‘] 1Ñ%ˆFØ×7Ñ7ò    3ˆIð—=‘= IÒ-ô —K‘K×*Ñ*Ü—K‘K×&Ñ&Ü'˜Ð0Jð'óñðð ô—L‘L¡&£(¨IÐ!6¸dÔCˆEØ M‰M˜%Ô  Ø J‰J˜)˜ A i [Ð1Õ 2ñ    3ð    3ð( SÑ )Ð)rrSrTcó—|jS)zR
    Fixture for all allowable combinations of parser
    and float precision
    r^r_s rÚall_parsers_all_precisionsruÒs€ð =‰=Ðr)ééé )ÚrhÚ_ÚutfÚUTFz{0})rScó—|jS)zE
    Fixture for all possible integer values for a UTF encoding.
    r^r_s rÚ    utf_valuer~èó€ð
=‰=Ðrcó—|jS)zD
    Fixture for all possible string formats of a UTF encoding.
    r^r_s rÚ encoding_fmtrðrr)*)z-1,0çð¿)z-1,2e0g333333ó¿)z-1e0r‚)z+1e0çð?)z+1e+0rƒ)z+1e-1皙™™™™¹?)z+,1e1rƒ)z+1,e0rƒ)z-,1e1r‚)z-1,e0r‚)z0,1r„)z1,rƒ)z,1r„)z-,1gš™™™™™¹¿)z1_,rƒ)z1_234,56ç
×£p=J“@)z
1_234,56e0r…)rzrz)ú-_r†)ú-_1r‡)ú-_1e0rˆ)Ú_1r‰)ú_1,rŠ)ú_1,_r‹)Ú_1e0rŒ)ú1,2e_1r)ú1,2e1_0rŽ)ú1,_2r)ú,1__2r)ú,1er‘)ú-,1er’)ú 1_000,000_000r“)ú1,e1_2r”)úe11,2r•)ú1e11,2r–)ú1,2,2r—)ú1,2_1r˜)ú    1,2e-10e1r™)ú--1,2rš)ú1a_2,1r›)z1,2E-1g¸…ëQ¸¾?)z1,2E1g(@có—|jS)z¨
    Fixture for all numeric formats which should get recognized. The first entry
    represents the value to read while the second represents the expected result.
    r^r_s rÚnumeric_decimalrøs€ðh =‰=Ðrcó—d|jvr|jd«}n$d|jvr|jd«d}ny|jdk(r2tjj d¬«}|j |«yy)z‰
    Fixture that xfails a test if the engine is pyarrow.
 
    Use if failure is do to unsupported keywords or inconsistent results.
    r\rurNr=zpyarrow doesn't support this.rL)Ú fixturenamesÚgetfixturevaluer
rXrmÚxfailÚ applymarker)r[r@rms   rÚ pyarrow_xfailr£/s€€ð˜×,Ñ,Ñ,Ø×(Ñ(¨Ó7‰Ø    %¨×)=Ñ)=Ñ    =à×(Ñ(Ð)EÓFÀqÑI‰àØ ‡}}˜    Ò!܏{‰{× Ñ Ð(GРÓHˆØ×јDÕ!ð"rcóؗd|jvr|jd«}n$d|jvr|jd«d}ny|jdk(rtjd¬«yy)zƒ
    Fixture that skips a test if the engine is pyarrow.
 
    Use if failure is do a parsing failure from pyarrow.csv.read_csv
    r\rurNr=z,https://github.com/apache/arrow/issues/38676rL)rŸr r
rXÚskip)r[r@s  rÚ pyarrow_skipr¦Bsg€ð˜×,Ñ,Ñ,Ø×(Ñ(¨Ó7‰Ø    %¨×)=Ñ)=Ñ    =à×(Ñ(Ð)EÓFÀqÑI‰àØ ‡}}˜    Ò!܏ ‰ ÐIÖJð"r)6Ú
__future__rrGrXÚ pandas.compatrÚpandas.compat._optionalrÚpandasrrÚpandas._testingÚ_testingrr    r.r4r7r9r<ÚfixturerDrJÚ_cParserHighMemoryÚ_cParserLowMemoryÚ _pythonParserÚ_pyarrowParserÚ_py_parsers_onlyÚ_c_parsers_onlyrWrmrnroÚ_pyarrow_parsers_onlyrjÚ_py_parser_idsÚ _c_parser_idsÚ_pyarrow_parsers_idsrkr\r`rcrersruÚ _utf_valuesÚ_encoding_sepsÚ_encoding_prefixesÚ_encoding_fmtsr~rrr£r¦)ÚsepÚprefixs00rú<module>r¾søðÝ"ã    ã å%Ý,÷õ÷7/ñ7/ôt;ˆjô;ô
˜ôôwôô%:ô%ô
%Jô%ð
‡ñ,óð,ð‡ñDóðDð'ÐØ$ÐØ€ Ø€à!?ÐØ%Ð'8Ð9€à€F‡LLØà K‰K× "Ñ "Ø K‰K× Ñ  ;˜Ð7QÐ Ó Rð
ôðÐðMÐLÐ#3ÐLÐ6KÐL€ à€Ø˜7Ð#€ Ø!{ÐàJMÐJ NÐJÐ5IÐJ€ð€‡|¨Ô9ñ ó:ð ð€‡¨MÔ:ñó;ðð€‡Ð'¨^Ô<ñó=ðð€‡Ð,Ð2FÔGñóHðò*ð<€‡Ù 7Ó 9¸(Ñ CÙ4Ó6°uÑ=ôñó    ðò€ â€Ø˜U^Ðð&4÷Ø!ÐBTòØ8>€v€hˆsˆe5ÒðØó€ð
€‡{Ô#ñó$ðð€‡~Ô&ñó'ðð€‡ò, ô.ñ^ó_.ð^ð‡ñ"óð"ð$‡ñKóñKùóAsÆ$H/