zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
U
­ý°d=ã @s,dZddlmZddlZddlZddlmZmZddl    m
Z ej   d¡Zdd„Zej  dd    ied
d gd d gd
dggddgdfddddgdddgdœed
d gd d gd
dgd dgd
dggddgdfdied
d gd d gd
dggddgdfddgdgdœed
d gd d
ggddgdfg¡dd„ƒZd d!„Zeej  d"d#d$g¡d%d&„ƒƒZd'd(„Zeej  d)dejejg¡d*d+„ƒƒZeej  d,e ej¡je ej¡je ej¡jg¡d-d.„ƒƒZeej  d,e ej¡jd e ej¡jd g¡d/d0„ƒƒZeej  d1ed2ƒed3ƒged3ƒed2ƒgg¡d4d5„ƒƒZd6d7„ZdS)8zy
Tests that work on both the Python and C engines but do not have a
specific classification into the other test modules.
é)ÚStringION)Ú    DataFrameÚSeriesZ pyarrow_skipcCsHd}|}| t|ƒ¡}tddgddgddggdd    gd
}t ||¡dS) NzA,B
1.0,1
2.0,2
3.0,3
gð?ég@ég@éÚAÚB©Úcolumns©Úread_csvrrÚtmÚassert_frame_equal©Ú all_parsersÚdataÚparserÚresultÚexpected©rú^d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/io/parser/common/test_ints.pyÚtest_int_conversions
"rzdata,kwargs,expectedzA,B
True,1
False,2
True,3TrFrrrr    r
zA,B
YES,1
no,2
yes,3
No,3
Yes,3ÚyesZYesZYESÚnoÚNOZNo)Z true_valuesZ false_valueszA,B
TRUE,1
FALSE,2
TRUE,3zA,B
foo,bar
bar,fooZfooÚbarcCs&|}|jt|ƒf|Ž}t ||¡dS)N)r rrr)rrÚkwargsrrrrrrÚtest_parse_bool"src CsFd}|}| t|ƒ¡}tdddddddddddg
iƒ}t ||¡dS)Nz»Numbers
17007000002000191
17007000002000191
17007000002000191
17007000002000191
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000192
17007000002000194ZNumbersl?u /ãl@u /ãlBu /ãr rrrrÚ&test_parse_integers_above_fp_precisionDs& öÿÿrÚsepú z\s+cCs@d}|}|jt|ƒd|d}tddgddggƒ}t ||¡dS)Nz65248E10 11
55555E55 22
)Úheaderr gü´j‹Cé g!E¬(E VLér )rr rrrrrrrÚtest_integer_overflow_buges
r%cCs>|}d}| t|ƒ¡}tddgdtjgdœƒ}t ||¡dS)Nz
A,B
0,0
0,r)rr    )r rrÚnpÚnanrr)rrrrrrrrÚtest_int64_min_issuesqs
r(Úconvc    Cs€d}|}|dkrH| t|ƒ¡}tdddddddgd    gd
}t ||¡n4d }tjt|d |jt|ƒd    |id W5QRXdS)Nz¿ID
00013007854817840016671868
00013007854817840016749251
00013007854817840016754630
00013007854817840016781876
00013007854817840017028824
00013007854817840017963235
00013007854817840018860166Z00013007854817840016671868Z00013007854817840016749251Z00013007854817840016754630Z00013007854817840016781876Z00013007854817840017028824Z00013007854817840017963235Z00013007854817840018860166ZIDr
z^(Python int too large to convert to C long)|(long too big to convert)|(int too big to convert))Úmatch)Ú
converters)r rrrrÚpytestZraisesÚ OverflowError)rr)rrrrÚmsgrrrÚtest_int64_overflow{s(ù    ö ÿr/ÚvalcCs4|}|jtt|ƒƒdd}t|gƒ}t ||¡dS©N©r"©r rÚstrrrr©rr0rrrrrrÚtest_int64_uint64_range§s
r6cCs8|}|jtt|ƒƒdd}tt|ƒgƒ}t ||¡dSr1r3r5rrrÚtest_outside_int64_uint64_rangeµsr7Úexp_dataéÿÿÿÿlcCs8|}d |¡}t|ƒ}|jt|ƒdd}t ||¡dS)NÚ
r2)Újoinrr rrr)rr8rrrrrrrÚtest_numeric_range_too_wideÃs
 
r<cCs>d}|}|jt|ƒddd}tddgdd}t ||¡dS)Nz—1,1;0;0;0;1;1;3844;3844;3844;1;1;1;1;1;1;0;0;1;1;0;0,,,4321583677327450765
5,1;0;0;0;1;1;843;843;843;1;1;1;1;1;1;0;0;1;1;0;0,64.0,;,4321113141090630389r2él"udÔeÊ_lõ:õa6½_)Úname)r rrrZassert_series_equal)rÚsrrrrrrÚtest_integer_precisionÐs
r@) Ú__doc__ÚiorÚnumpyr&r,ZpandasrrZpandas._testingZ_testingrÚmarkZ usefixturesZ skip_pyarrowrZ parametrizerrr%r(Úint64Zuint64r/ZiinfoÚmaxÚminr6r7r4r<r@rrrrÚ<module>sn     ý þý     ý ýíþ
!
 
 *&ÿ
"ÿ
(