1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
U
­ý°d  ã@s6ddlZddlmZmZddlmZGdd„dƒZdS)éN)Ú    DataFrameÚ
date_rangec@s$eZdZdd„Zdd„Zdd„ZdS)Ú
TestEqualscCsBtddgddgdœƒ}tddgddgdœƒ}| |¡dks>t‚dS)NééÚsÚd)ÚaÚbF)rÚequalsÚAssertionError)ÚselfÚdf1Údf2©rú]d:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/frame/methods/test_equals.pyÚtest_dataframe_not_equal sz#TestEquals.test_dataframe_not_equalcCs~tddgddgddgdœƒ}| ¡dd    d
g}|sR|jjd j|jjd jksRt‚t ||¡| |¡slt‚| |¡szt‚dS) NÚxÚyrrÚwÚz)ÚAÚBÚCrrrr)    rZ reset_indexZ_mgrÚblocksZdtyper ÚtmZassert_frame_equalr )r Zusing_array_managerZdf0rrrrÚtest_equals_different_blockss  z'TestEquals.test_equals_different_blockscCsVtj d¡}ttj d¡|dgd}d ¡|d<tdddd|d    <tddd
d|d <|d |d    |d <t d¡d dk t¡|d<tj|j    ddd…<| 
¡}|d  |d¡s´t ‚|d      |d    ¡sÊt ‚|d   |d ¡sàt ‚|d   |d ¡söt ‚|d  |d¡st ‚|  |¡st ‚|  t¡r.t ‚| 
¡}|d d¡|d<|  |¡rXt ‚| }|  |¡}|  |¡rxt ‚| 
¡}|jddd…|_|  |¡r¢t ‚tdddd}|  |¡}| 
¡}|  |¡sÒt ‚|j dgdd}|j dgdd}|  |¡st ‚|j dgdd}|  |¡r"t ‚|j dgdd}|j dgdd}|  |¡sRt ‚dS)Né
Zfloats)ÚindexÚcolumnsz0the sky is so blue. we could use more chocolate.Útextz2000-1-1ÚT)ZperiodsÚfreqÚstartÚDÚendZdifférÚboolrÚfloat32éÿÿÿÿT)Úappend)ÚnpÚrandomrÚsplitrZarangeZastypeÚobjectÚnanÚlocÚcopyr r Z    set_indexr)r rrrZ    differentZdifferent_indexZdf3rrrÚ test_equalssJ  
 
zTestEquals.test_equalsN)Ú__name__Ú
__module__Ú __qualname__rrr2rrrrr
sr)    Únumpyr+ZpandasrrZpandas._testingZ_testingrrrrrrÚ<module>s