o
    i                     @   s2   d dl mZmZmZ d dlmZ G dd dZdS )    )	DataFrameIndexSeriesNc                   @   s$   e Zd Zdd Zdd Zdd ZdS )TestToFramec                 C   s   t td}tt |d }W d    n1 sw   Y  tdg}t|j| tt |	dd }W d    n1 sDw   Y  tdgt
d}t|j| d S )N   r   foo)dtype)r   rangetmassert_produces_warningFutureWarningto_framer   assert_index_equalcolumnsrenameobject)selfserresult	exp_index r   d/var/www/edux/Edux_v2/venv/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_framec                    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_expanddim2   s   zTTestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeries._constructor_expanddimN)__name__
__module____qualname__propertyr&   r   r$   r   r   SubclassedSeries1   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%   6   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#   r1   r   r   r   r   r   	   s    r   )pandasr   r   r   pandas._testing_testingr
   r   r   r   r   r   <module>   s    