
    Eg                     H    d dl Z d dlmZmZmZ d dlmZ  G d d          ZdS )    N)	DataFrameIndexSeriesc                   `    e Zd Zd Zd Zej                            d          d             ZdS )TestToFramec                 |   t          t          d                    }|                    d           }t          d gt                    }t          j        |j        |           |                    d                              d           }t          d gt                    }t          j        |j        |           d S )N   )dtypefoo)	r   rangeto_framer   objecttmassert_index_equalcolumnsrename)selfserresult	exp_indexs       ^/var/www/sysmax/venv/lib/python3.11/site-packages/pandas/tests/series/methods/test_to_frame.py test_to_frame_respects_name_nonez,TestToFrame.test_to_frame_respects_name_none   s     U1XXd##4&///	
fni888E""++D114&///	
fni88888    c                    d |_         |                                }t          |j        |j                  }t          j        ||           d|_         |                                }t          d|j        i|j                  }t          j        ||           |                    d          }t          d|j        i|j                  }t          j        ||           d S )N)indextestnametestdifferentname)r   r   r   valuesr   r   assert_frame_equal)r   datetime_seriesrsxps       r   test_to_framezTestToFrame.test_to_frame   s    #%%''-_5JKKK
b"%%%)%%''/08M
 
 
 	b"%%%%%?%;;o45_=R
 
 
 	b"%%%%%r   zMignore:Passing a BlockManager|Passing a SingleBlockManager:DeprecationWarningc                 
    G fddt                     } G d dt                     |g dd          }|                                }t          |          sJ  dg di          }t	          j        ||           d S )Nc                   *    e Zd Ze fd            ZdS )=TestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeriesc                     S )N )r   SubclassedFrames    r   _constructor_expanddimzTTestToFrame.test_to_frame_expanddim.<locals>.SubclassedSeries._constructor_expanddim4   s	    &&r   N)__name__
__module____qualname__propertyr,   )r+   s   r   SubclassedSeriesr(   3   s8        ' ' ' ' X' ' 'r   r1   c                       e Zd ZdS )<TestToFrame.test_to_frame_expanddim.<locals>.SubclassedFrameN)r-   r.   r/   r*   r   r   r+   r3   8   s        Dr   r+   )      r	   Xr   )r   r   r   
isinstancer   r!   )r   r1   r   r   expectedr+   s        @r   test_to_frame_expanddimz#TestToFrame.test_to_frame_expanddim-   s    	' 	' 	' 	' 	' 	' 	'v 	' 	' 	'
	 	 	 	 	i 	 	 	 yyys333&/22222"?C#344
fh/////r   N)	r-   r.   r/   r   r%   pytestmarkfilterwarningsr9   r*   r   r   r   r      se        9 9 9& & && [W 0 0 0 0 0r   r   )	r:   pandasr   r   r   pandas._testing_testingr   r   r*   r   r   <module>r@      s             
      40 40 40 40 40 40 40 40 40 40r   