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
U
­ý°d>
ã@sFddlZddlZddlmZe d¡Zejdd„ƒZ    Gdd„dƒZ
dS)éNÚtablesc     csÞtjddtjdddtjdddœ}d}|dddœ|dd    ddœ|dd
d dœ|d d ddœg}d}|d}tj|ddF}|jd||d}|D]*}| ¡D]\}    }
|
|j|    <qž|j ¡q’W5QRX||t     
|¡fVdS)z4
    Use PyTables to create a simple HDF5 file.
    r)Úposééé)Zc0Zc1Úc2gš$C×AZaaaaaZbbbbbZccccci †éZdddddlÿÿZpandas_test_timeserieszwritten_with_pytables.h5Úw)Úmodeú/)ÚnameÚ descriptionN) rZ    Time64ColZ    StringColZInt64ColÚ    open_fileZ create_tableÚitemsÚrowÚappendÚpdZ    DataFrame) Ztmp_pathZ table_schemaÚt0Z testsamplesÚobjnameÚpathÚfÚtÚsampleÚkeyÚvalue©rú[d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/io/pytables/test_compat.pyÚpytables_hdf5_file    s&
 
ý
ü rc@s0eZdZdZdd„Zdd„Zdd„Zdd    „Zd
S) ÚTestReadPyTablesHDF5z©
    A group of tests which covers reading HDF5 files written by plain PyTables
    (not written by pandas).
 
    Was introduced for regression-testing issue 11188.
    cCs0|\}}}tj||d}|}tj||dddS)N)rT©Zcheck_index_type)rÚread_hdfÚtmÚassert_frame_equal©ÚselfrrrZdfÚresultÚexpectedrrrÚtest_read_complete2s
z'TestReadPyTablesHDF5.test_read_completecCsB|\}}}tj||dd}|dd…jdd}tj||dddS)Nr)rÚstartT©Zdropr©rr Z reset_indexr!r"r#rrrÚtest_read_with_start8s
z)TestReadPyTablesHDF5.test_read_with_startcCsB|\}}}tj||dd}|dd…jdd}tj||dddS)Nr)rÚstopTr)rr*r#rrrÚtest_read_with_stop?s
z(TestReadPyTablesHDF5.test_read_with_stopcCsD|\}}}tj||ddd}|dd…jdd}tj||dddS)Nrr)rr(r,Tr)rr*r#rrrÚtest_read_with_startstopFs
z-TestReadPyTablesHDF5.test_read_with_startstopN)Ú__name__Ú
__module__Ú __qualname__Ú__doc__r'r+r-r.rrrrr*s
r) ZpytestZpandasrZpandas._testingZ_testingr!Z importorskiprZfixturerrrrrrÚ<module>s