U
    b                     @   s   d dl Zd dlZd dlZd dlmZ ejdgddggddd Z	e dd Z
ejd	dejdd
fdgejdd
gfddgdejdd
gfddgejdd
dgfgdd Zejdddddgdgdgddgddgdddgdddgg
dd ZdS )    Ninnerouter)paramsc                 C   sV   | j }tddddddgddddddgtdddddddgd	}|rR||}|S )
Nab            onetwor   r   AB)parampd	DataFramenparange	set_index)requestlevelsdf r   M/tmp/pip-unpacked-wheel-ck39h295/pandas/tests/groupby/test_index_as_string.pyframe   s    
r   c                  C   sV   t ddddddgddddddgtdddddddgd	} | d
ddgd }|S )Nr   r   r   r   r	   r
   r   r   r   r   r   r   r   )r   r   r   r   r   )r   sr   r   r   series   s    r   zkey_strs,grouperslevelr   c                 C   s,   |  | }|  | }t|| d S )N)groupbymeantmZassert_frame_equal)r   Zkey_strsgroupersresultexpectedr   r   r   "test_grouper_index_level_as_string(   s    
r&   r   c                 C   sR   t |trdd |D }ntj|d}| | }| | }t|| d S )Nc                 S   s   g | ]}t j|d qS )r   )r   Grouper).0lvr   r   r   
<listcomp>J   s     z=test_grouper_index_level_as_string_series.<locals>.<listcomp>r   )
isinstancelistr   r'   r    r!   r"   Zassert_series_equal)r   r   r#   r%   r$   r   r   r   )test_grouper_index_level_as_string_series7   s    
r-   )Znumpyr   ZpytestZpandasr   Zpandas._testingZ_testingr"   Zfixturer   r   markZparametrizer'   r&   r-   r   r   r   r   <module>   s>   

	
