zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
U
­ý°d¦    ã@sBdZddlZddlZddlmZmZddlmZ    Gdd„dƒZ
dS)z[
Tests for DataFrame cumulative operations
 
See also
--------
tests.series.test_cumulative
éN)Ú    DataFrameÚSeriesc@sBeZdZdd„Zdd„Zej ddddd    g¡d
d „ƒZd d „Z    dS)ÚTestDataFrameCumulativeOpscCsdtdt d¡it d¡d}| ¡| ¡| ¡tt d¡ dd¡tdƒtdƒd}| ¡dS)NÚAé)Úindexéé)rÚcolumns)rÚnpZarangeÚcummaxÚcumminÚcumsumZreshapeÚrange)ÚselfÚdfÚdm©rúYd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/tests/frame/test_cumulative.pyÚtest_cumulative_ops_smokes $z4TestDataFrameCumulativeOps.test_cumulative_ops_smokecCsŠtj|jdd…df<tj|jdd…df<tj|jdd…df<| d¡ t¡}| d¡| d¡| d¡ tj¡}| d¡| d¡dS)Nr    é
rééé)r ÚnanÚilocZfillnaZastypeÚintÚcumprodÚint32)rÚdatetime_framerrrrÚtest_cumprod_smoke"s
 
 
z-TestDataFrameCumulativeOps.test_cumprod_smokeÚmethodrrr r cCs°tj|jdd…df<tj|jdd…df<tj|jdd…df<t||ƒƒ}| tt|ƒ¡}t ||¡t||ƒdd}|jtt|ƒdd}t ||¡t |¡t |¡ks¬t    ‚dS)Nr    rrrrr)Zaxis)
r rrÚgetattrÚapplyrÚtmÚassert_frame_equalÚshapeÚAssertionError)rrr!ÚresultÚexpectedrrrÚ&test_cumulative_ops_match_series_apply1s   zATestDataFrameCumulativeOps.test_cumulative_ops_match_series_applycCsrtdddgdddgdddgdœƒ}| ¡}ttdddgtjd    tdddgtjd    |d
 ¡dœƒ}t ||¡dS) Nrrég@TF)rÚBÚCé)Zdtyper-)rrrr Úint64Úfloat64r$r%)rrr(r)rrrÚtest_cumsum_preserve_dtypesDs"
ýÿz6TestDataFrameCumulativeOps.test_cumsum_preserve_dtypesN)
Ú__name__Ú
__module__Ú __qualname__rr ÚpytestÚmarkZ parametrizer*r1rrrrrs
 
r) Ú__doc__Únumpyr r5ZpandasrrZpandas._testingZ_testingr$rrrrrÚ<module>s