
    bMh                     4    d dl Z d dlmZ  G d d          ZdS )    Nc                   &    e Zd Zd Zd Zd Zd ZdS )TestDataFrameTakec                 N   |}t          ddd          }t          j        t                    5  |                    |d           d d d            n# 1 swxY w Y   t          j        t                    5  |                    |d           d d d            d S # 1 swxY w Y   d S )Nr         axis)slicetmassert_produces_warningFutureWarningtake)selffloat_framedfslcs       e/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/pandas/tests/frame/indexing/test_take.pytest_take_slices_deprecatedz-TestDataFrameTake.test_take_slices_deprecated   s   Aq!nn'66 	! 	!GGCaG   	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!'66 	! 	!GGCaG   	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	! 	!s#   AAA5BB!Bc                 T   g d}|fD ]}|                     |d          }|                    |j                             |                    }t          j        ||           |                     |d          }|j        d d g df         }t          j        ||d           g d}|fD ]}|                     |d          }|                    |j                             |                    }t          j        ||           |                     |d          }t          j        ||           |                     |d          }|j        d d g d	f         }t          j        ||d           d
}t          j        t          |          5  |                     g dd           d d d            n# 1 swxY w Y   t          j        t          |          5  |                     g dd           d d d            n# 1 swxY w Y   t          j        t          |          5  |                     g dd           d d d            n# 1 swxY w Y   t          j        t          |          5  |                     g dd           d d d            d S # 1 swxY w Y   d S )N)   r      r   r   r   r   )DBCAF)check_names)r   r   )r   r   r   zindices are out-of-bounds)match)r   r   r      )r   r   r   i)r   r   r      )r   r   r   )	r   reindexindexr   assert_frame_equallocpytestraises
IndexError)r   r   orderr   resultexpectedmsgs          r   	test_takezTestDataFrameTake.test_take   s   - 	G 	GBWWUW++Fzz"(--"6"677H!&(333 WWUW++Fvaaa!5!5!556H!&(FFFFF 

- 	G 	GBWWUW++Fzz"(--"6"677H!&(333WWUW++F!&(333 WWUW++Fvaaa01H!&(FFFFF *]:S111 	+ 	+GGMMMG***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+]:S111 	, 	,GGNNNG+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	,]:S111 	* 	*GGLLLqG)))	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	* 	*]:S111 	+ 	+GGMMMG***	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+ 	+sH   F88F<?F<HHH*III6JJ!$J!c                    g d}|fD ]}|                     |d          }|                    |j                             |                    }t          j        ||           |                     |d          }|j        d d g df         }t          j        ||           g d}|fD ]}|                     |d          }|                    |j                             |                    }t          j        ||           |                     |d          }|j        d d g df         }t          j        ||           d S )N)r   r   r   r   r   r   r   r   )foor   r   r   r   )r   r   )r/   r   r   r   r"   r#   r   r$   r%   )r   float_string_framer)   r   r*   r+   s         r   test_take_mixed_typez&TestDataFrameTake.test_take_mixed_type8   sd   %& 	4 	4BWWUW++Fzz"(--"6"677H!&(333 WWUW++Fvaaa!<!<!<<=H!&(3333 

%& 	4 	4BWWUW++Fzz"(--"6"677H!&(333 WWUW++Fvaaa!2!2!223H!&(3333	4 	4    c                 L   g d}||fD ]}|                     |d          }|                    |j                             |                    }t          j        ||           |                     |d          }|j        d d g df         }t          j        ||           d S )N)r   r   r   r   r   r   r   )r   r   r   r   r1   )r   mixed_float_framemixed_int_framer)   r   r*   r+   s          r   test_take_mixed_numericz)TestDataFrameTake.test_take_mixed_numericQ   s    $o6 	4 	4BWWUW++Fzz"(--"6"677H!&(333 WWUW++Fvaaa!5!5!556H!&(3333	4 	4r4   N)__name__
__module____qualname__r   r-   r3   r8    r4   r   r   r      sQ        ! ! !%+ %+ %+N4 4 424 4 4 4 4r4   r   )r&   pandas._testing_testingr   r   r<   r4   r   <module>r?      s\          V4 V4 V4 V4 V4 V4 V4 V4 V4 V4r4   