
    bMhU	                     P    d Z ddlZddlZddlmZmZ ddlmZ	  G d d          Z
dS )z[
Tests for DataFrame cumulative operations

See also
--------
tests.series.test_cumulative
    N)	DataFrameSeriesc                   l    e Zd Zd Zd Zej                            dg d          d             Zd Z	dS )TestDataFrameCumulativeOpsc                    t          dt          j        d          it          j        d                    }|                                 |                                 |                                 t          t          j        d                              dd          t          d          t          d                    }|                                 d S )NA   )index      )r
   columns)r   nparangecummaxcummincumsumreshaperange)selfdfdms      b/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/frame/test_cumulative.pytest_cumulative_ops_smokez4TestDataFrameCumulativeOps.test_cumulative_ops_smoke   s    RYr]]+29R==AAA
		
		
		ry}},,Q22%((ERSHHUUU
		    c                    t           j        |j        dddf<   t           j        |j        dddf<   t           j        |j        dd df<   |                    d                              t
                    }|                    d           |                    d           |                    d                              t           j                  }|                    d           |                    d           d S )Nr   
   r            )r   nanilocfillnaastypeintcumprodint32)r   datetime_framer   s      r   test_cumprod_smokez-TestDataFrameCumulativeOps.test_cumprod_smoke"   s    ')vAbD!G$(*BrE1H%&(fBCCF# ""1%%,,S11


1


1 ""1%%,,RX66


1


1r   method)r   r%   r   r   c                 J   t           j        |j        dddf<   t           j        |j        dddf<   t           j        |j        dd df<    t          ||                      }|                    t          t
          |                    }t          j        ||            t          ||          d          }|                    t          t
          |          d          }t          j        ||           t          j        |          t          j        |          k    sJ d S )Nr   r   r   r   r   r   )axis)	r   r    r!   getattrapplyr   tmassert_frame_equalshape)r   r'   r)   resultexpecteds        r   &test_cumulative_ops_match_series_applyzATestDataFrameCumulativeOps.test_cumulative_ops_match_series_apply1   s   ')vAbD!G$(*BrE1H%&(fBCCF# 10022!''(?(?@@
fh/// 100a888!''(?(?a'HH
fh/// x28N#;#;;;;;;;r   c                 L   t          g dg dg dd          }|                                }t          t          g dt          j                  t          g dt          j                  |d                                         d          }t          j        ||           d S )N)r   r      )r   r   g      @)TFF)r   BC)r   r5      )dtyper7   )r   r   r   r   int64float64r.   r/   )r   r   r1   r2   s       r   test_cumsum_preserve_dtypesz6TestDataFrameCumulativeOps.test_cumsum_preserve_dtypesD   s    YYY[[[?S?S?STTUUIIIRX666IIIRZ888W^^%% 
 
 	fh/////r   N)
__name__
__module____qualname__r   r(   pytestmarkparametrizer3   r<    r   r   r   r      sw        	 	 	   [X'P'P'PQQ< < RQ<$0 0 0 0 0r   r   )__doc__numpyr   r@   pandasr   r   pandas._testing_testingr.   r   rC   r   r   <module>rI      s                      >0 >0 >0 >0 >0 >0 >0 >0 >0 >0r   