o
    ŀg                     @   s:   d dl Z d dlmZmZmZ d dlmZ G dd dZdS )    N)	DataFrameIndexSeriesc                   @   s0   e Zd Zdd Zdd Zejddd ZdS )	TestToFramec                 C   sb   t td}|d }td gtd}t|j| |dd }td gtd}t|j| d S )N   )dtypefoo)	r   rangeto_framer   objecttmassert_index_equalcolumnsrename)selfserresult	exp_index r   ]/var/www/html/myenv/lib/python3.10/site-packages/pandas/tests/series/methods/test_to_frame.py test_to_frame_respects_name_none   s   
z,TestToFrame.test_to_frame_respects_name_nonec                 C   s   d |_ | }t|j|jd}t|| d|_ | }td|ji|jd}t|| |jdd}td|ji|jd}t|| d S )N)indextestnametestdifferentname)r   r
   r   valuesr   r   assert_frame_equal)r   datetime_seriesrsxpr   r   r   test_to_frame   s   zTestToFrame.test_to_framezMignore:Passing a BlockManager|Passing a SingleBlockManager:DeprecationWarningc                    sj   G  fdddt }G dd dt |g ddd}| }t| s%J  dg di}t|| d S )Nc                       s   e Zd Ze fddZdS )z=TestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeriesc                    s    S )Nr   )r   SubclassedFramer   r   _constructor_expanddim4   s   zTTestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeries._constructor_expanddimN)__name__
__module____qualname__propertyr$   r   r"   r   r   SubclassedSeries3   s    r)   c                   @   s   e Zd ZdS )z<TestToFrame.test_to_frame_expanddim.<locals>.SubclassedFrameN)r%   r&   r'   r   r   r   r   r#   8   s    r#   )      r   Xr   )r   r   r
   
isinstancer   r   )r   r)   r   r   expectedr   r"   r   test_to_frame_expanddim-   s   z#TestToFrame.test_to_frame_expanddimN)	r%   r&   r'   r   r!   pytestmarkfilterwarningsr/   r   r   r   r   r      s    r   )	r0   pandasr   r   r   pandas._testing_testingr   r   r   r   r   r   <module>   s    