a
    Pf[                     @   s6   d Z ddlZddlmZmZmZmZ G dd dZdS )z\
Series.item method, mainly testing that we get python scalars as opposed to
numpy scalars.
    N)Series	Timedelta	Timestamp
date_rangec                   @   s   e Zd Zdd ZdS )TestItemc                 C   sp  t dg}| }|dksJ ||jd ks0J t|ts>J t dgdgd}| }t|tsdJ |dkspJ t ddg}d}tjt|d |  W d    n1 s0    Y  t	d	dd
}tjt|d |  W d    n1 s0    Y  tjt|d t |  W d    n1 s*0    Y  |d d  }t|t
sTJ t |d d  }t|t
sxJ || }tjt|d |  W d    n1 s0    Y  tjt|d t |  W d    n1 s0    Y  |d d  }t|tsJ t |d d  }t|ts8J t |ddgd}|jd d  }||d kslJ d S )N   r   g      ?   )index   z#can only convert an array of size 1)matchz
2016-01-01)Zperiods      )r   itemZiloc
isinstanceintfloatpytestZraises
ValueErrorr   r   r   )selfZserresultmsgZdtivalZtdi r   ^/var/www/ai-form-bot/venv/lib/python3.9/site-packages/pandas/tests/series/methods/test_item.py	test_item   sD    
&&,(,zTestItem.test_itemN)__name__
__module____qualname__r   r   r   r   r   r      s   r   )__doc__r   Zpandasr   r   r   r   r   r   r   r   r   <module>   s   