
    Owg                     ,    d dl Z d dlmZ  G d d      Zy)    Nc                   $    e Zd Zd Zd Zd Zd Zy)TestDataFrameTakec                 &   |}t        ddd      }t        j                  t              5  |j	                  |d       d d d        t        j                  t              5  |j	                  |d       d d d        y # 1 sw Y   ?xY w# 1 sw Y   y xY w)Nr         axis)slicetmassert_produces_warningFutureWarningtake)selffloat_framedfslcs       \/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/frame/indexing/test_take.pytest_take_slices_deprecatedz-TestDataFrameTake.test_take_slices_deprecated   s    Aq!n''6 	!GGCaG 	!''6 	!GGCaG 	! 	!	! 	!	! 	!s   A;B;BBc                    g d}|fD ]  }|j                  |d      }|j                  |j                  j                  |            }t        j                  ||       |j                  |d      }|j
                  d d g df   }t        j                  ||d        g d}|fD ]  }|j                  |d      }|j                  |j                  j                  |            }t        j                  ||       |j                  |d      }t        j                  ||       |j                  |d      }|j
                  d d g d	f   }t        j                  ||d        d
}t        j                  t        |      5  j                  g dd       d d d        t        j                  t        |      5  j                  g dd       d d d        t        j                  t        |      5  j                  g dd       d d d        t        j                  t        |      5  j                  g dd       d d d        y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   [xY w# 1 sw Y   y xY w)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BWWUW+Fzz"((--"67H!!&(3 WWUW+Fvva!556H!!&(F	G - 	GBWWUW+Fzz"((--"67H!!&(3WWUW+F!!&(3 WWUW+Fvva01H!!&(F	G *]]:S1 	+GGMG*	+]]:S1 	,GGNG+	,]]:S1 	*GGLqG)	*]]:S1 	+GGMG*	+ 	+	+ 	+	, 	,	* 	*	+ 	+s0   I>I7I'0I3II$'I03I<c                 x   g d}|fD ]  }|j                  |d      }|j                  |j                  j                  |            }t        j                  ||       |j                  |d      }|j
                  d d g df   }t        j                  ||        g d}|fD ]  }|j                  |d      }|j                  |j                  j                  |            }t        j                  ||       |j                  |d      }|j
                  d d g df   }t        j                  ||        y )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   s   %& 	4BWWUW+Fzz"((--"67H!!&(3 WWUW+Fvva!<<=H!!&(3	4 %& 	4BWWUW+Fzz"((--"67H!!&(3 WWUW+Fvva!223H!!&(3	4    c                 @   g d}||fD ]  }|j                  |d      }|j                  |j                  j                  |            }t        j                  ||       |j                  |d      }|j
                  d d g df   }t        j                  ||        y )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 	4BWWUW+Fzz"((--"67H!!&(3 WWUW+Fvva!556H!!&(3	4r4   N)__name__
__module____qualname__r   r-   r3   r8    r4   r   r   r      s    !%+N424r4   r   )r&   pandas._testing_testingr   r   r<   r4   r   <module>r?      s     V4 V4r4   