
    Owg                     @    d dl Z d dlmZmZmZ d dlmZ  G d d      Zy)    N)	DataFrameIndexSeriesc                   Z    e Zd Zd Zd Zej                  j                  d      d        Zy)TestToFramec                 V   t        t        d            }|j                  d       }t        d gt              }t        j                  |j                  |       |j                  d      j                  d       }t        d gt              }t        j                  |j                  |       y )N   )dtypefoo)	r   rangeto_framer   objecttmassert_index_equalcolumnsrename)selfserresult	exp_indexs       `/var/www/horilla/myenv/lib/python3.12/site-packages/pandas/tests/series/methods/test_to_frame.py test_to_frame_respects_name_nonez,TestToFrame.test_to_frame_respects_name_none   s}     U1Xd#4&/	
fnni8E"++D14&/	
fnni8    c                    d |_         |j                         }t        |j                  |j                        }t        j                  ||       d|_         |j                         }t        d|j                  i|j                        }t        j                  ||       |j                  d      }t        d|j                  i|j                        }t        j                  ||       y )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    #%%'--_5J5JK
b"%)%%'//08M8M
 	b"%%%?%;o445_=R=R
 	b"%r   zMignore:Passing a BlockManager|Passing a SingleBlockManager:DeprecationWarningc                      G fddt               } G d dt               |g dd      }|j                         }t        |      sJ  dg di      }t	        j
                  ||       y )Nc                   "    e Zd Ze fd       Zy)=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   s    ' 'r   r1   c                       e Zd Zy)<TestToFrame.test_to_frame_expanddim.<locals>.SubclassedFrameN)r-   r.   r/   r*   r   r   r+   r3   8   s    r   r+   )      r	   Xr   )r   r   r   
isinstancer   r!   )r   r1   r   r   expectedr+   s        @r   test_to_frame_expanddimz#TestToFrame.test_to_frame_expanddim-   sc    	'v 	'
	i 	 ys3&/222"C#34
fh/r   N)	r-   r.   r/   r   r%   pytestmarkfilterwarningsr9   r*   r   r   r   r      s2    9&& [[W00r   r   )	r:   pandasr   r   r   pandas._testing_testingr   r   r*   r   r   <module>r@      s!     
 40 40r   