a
    é´«jƒ  ã                   @   s.   d dl mZmZmZ d dlmZ ddd„ZdS )é    )ÚCategoricalÚIndexÚSeries)ÚBaseMaskedArrayNc                 C   s�   t | tƒr| j}nTt | tƒr6|du s.| j|kr6| j}n0|dusBJ ‚| j |¡}t |tƒs\J ‚|  |¡}t |t	ƒrv|j
S t |tƒr„|S t|d|ƒS )a  
    Helper method to get array for a DataFrame column or a Series.

    Equivalent of df[col].values, but without going through normal getitem,
    which triggers tracking references / CoW (and we might be testing that
    this is done by some other operation).
    NZ_ndarray)Ú
isinstancer   Z_valuesr   ÚnameÚcolumnsZget_locÚintZ_get_column_arrayr   Ú_datar   Úgetattr)ÚobjÚcolZarrZicol© r   úZ/var/www/html/laksyashrimp/venv/lib/python3.9/site-packages/pandas/tests/copy_view/util.pyÚ	get_array	   s    



r   )N)Zpandasr   r   r   Zpandas.core.arraysr   r   r   r   r   r   Ú<module>   s   