U
    ¾mœd¿  ã                $   @  s2  d Z ddlmZ ddlmZ ddlmZmZmZmZm	Z	 ddl
mZ ddlZddlZddlmZmZmZ ddlmZmZ ddlZdd	lmZ ddlZddlZdd
lmZmZ ddlm  m Z! ddl"m#Z#m$Z$ ddl%Z&ddl%m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- ddl.m/Z0 ddl1m2Z2 ddl3m4Z4m5Z5 zddl6Z7W n e8k
�rH   dZ9Y nX [7dZ9dZ:e-j;�r�ddl:Z:ze: <d¡ W n e:j=k
�rŽ   dZ:Y nX ddœdd„Z>dddddœdd„Z?ddœdd„Z@ejAjBddejCjDfd� ejA Ed¡ d F¡ D ]8ZGeHe&jIjJeGƒZKe LeKejMeKe Nd d!¡e O¡ d"�¡ �qìd# F¡ D ]DZGeHe&jIjJeGƒZKe LeKejMeKe Nd$d%¡e O¡ ejNd&d'd(�d)�¡ �q.d* F¡ D ]DZGeHe&jIjJeGƒZKe LeKejMeKe Nd+d,¡e O¡ ejNd&d'd(�d-�¡ �q|ejPddœd.d/„ƒZQejPdd0�ddœd1d2„ƒZRejPdd&d3d4gd5d6„ d7�d8d9„ ƒZSeSZTejPd&d4gd:d6„ d7�d;d<„ ƒZUejPdddgd=�d>d?„ ƒZVejPdddgd=�d@dA„ ƒZWejPddgd=�dBdC„ ƒZXejPdDdEdgd=�dFdG„ ƒZYejPdHdIdJdKgd=�dLdM„ ƒZZejPdJdKdHdIgd=�dNdO„ ƒZ[ejPdJdKdHdIgd=�dPdQ„ ƒZ\ejPddRdSdTdUdVej]dWe! ^dX¡dY�gd=�dZd[„ ƒZ_ejPdRdSdTdUdVej]dWe! ^dX¡dY�gd=�d\d]„ ƒZ`ejPddgd=�d^d_„ ƒZaejPd`dadJdKgd=�dbdc„ ƒZbejPdddegd=�dfdg„ ƒZcejPe0jddhd6„ d7�didj„ ƒZeeeZfejPdejge&jhgd=�dkdl„ ƒZieiZjejPe0jkdmd6„ d7�dndo„ ƒZlelZmejPe'e*gd=�dpdq„ ƒZnejPe4e*gd3drgd7�dsdt„ ƒZoeoZpejPe4e*e&jqgd3drdugd7�dvdw„ ƒZrejPe4e*e'e&jqgdxd6„ d7�dydz„ ƒZsesZtejPd{d|„ ƒZuejPd}d~„ ƒZvejPdd€„ ƒZwejPd�dœd‚dƒ„ƒZxejPd„dœd…d†„ƒZyd‡dˆ„ Zzd‰dŠ„ Z{e0 |d‹¡e0 }d‹¡e0j}d‹dŒd��e0 ~d‹¡e0 d‹¡e0 €d‹¡e0j�d‹dŽd��e0j�d‹d�d��e0j�d‹d‘d��e0j�d‹d’d��e0j‚d‹d“d��e0j‚d‹d”d��e0j‚d‹d•d��e0j‚d‹d–d��e0jƒd‹d—d��e0jƒd‹d˜d��e0 „d™¡ …e†¡e4ej‡ ˆd™¡dk ƒe0j‰d‹d˜d�� …dš¡e0j‰d‹d˜d�� …d›¡e0 Šd‹¡e0 ‹d‹¡e4g ƒe5 Œe�dœd�džgd&dŸd gƒ¡e{ƒ ezƒ e4ddd&d&dŸdŸgƒe4e Žd‹¡d¡d��e4e Žd‹¡d¢d��e4e Žd‹¡d£d��e4e Žd‹¡ …e�¡d¤d��e4e&jqe0 |d‹¡d¥d��ƒd¦œ Z�e9�r¨e4e&jqe0 |d‹¡d§d��ƒZ‘e‘e�d¨< ejPe� ’¡ d=�d©d3„ ƒZ“e“Z”ejPdªd«„ e� •¡ D ƒd=�d¬d­„ ƒZ–e–Z—ejPd®d«„ e� •¡ D ƒd=�d¯d°„ ƒZ˜ejPd±dœd²d³„ƒZ™ejPd±dœd´dµ„ƒZšejPd±dœd¶d·„ƒZ›d¸d¹„ Zœdºd»„ e� •¡ D ƒZ�ejPd±dœd¼d½„ƒZžejPd±dœd¾d¿„ƒZŸdÀd»„ e0j D ƒZ¡e�e�e¡–Z¢ejPe¢ ’¡ d=�dÁdÂ„ ƒZ£ejPd„dœdÃdÄ„ƒZ¤ejPd„dœdÅdÆ„ƒZ¥ejPd„dœdÇdÈ„ƒZ¦ejPd„dœdÉdÊ„ƒZ§ejPd±dœdËdÌ„ƒZ¨ejPe(dd%dÍ�e$d’dKƒfe(dÎdÏdÍ�e$d˜dKƒfe)dÐdÑdÒ�dÓfe)dÔdÕdÒ�dÖfe,d×dØd��e#dØd��fe+dÙdÚ�dÛfgd=�dÜdÝ„ ƒZ©dÞdßdàdádâdãdädådædçdèdédêdëgZªejPeªd=�dìdí„ ƒZ«ejPej¬e2j­ej®e2j¯ej°e2j±ej²e2j³ej´e2jµej¶e2j·ej¸e2j¹ejºej»ej¼ej½ej¾ej¿ejÀe2jÁejÂe2jÃejÄe2jÅgd=�dîdï„ ƒZÆejPej¬e2j­ej®e2j¯ej°e2j±ej²e2j³ej´e2jµej¶e2j·ej¸e2j¹gd=�dðdñ„ ƒZÇdòdódôdõdöd÷dødùdúdûdüdýgZÈejPeÈd=�dþdÿ„ ƒZÉ�d �dgZÊejPeÊd=��d�d„ ƒZËeÈeÊ ZÌejPeÌd=��d�d„ ƒZÍejPejºej»ej¾ej¿ej¼ej½gd=��d�d„ ƒZÎejP�d�d	�d
�dgd=��d�d„ ƒZÏejP�d�d�d�d�d�dgd=��d�d„ ƒZÐ�d�d�d�dgZÑejPeÑd=��d�d„ ƒZÒejP�d�d„ ƒZÓejPd�d�dœ�d �d!„ƒZÔejPd„dœ�d"�d#„ƒZÕdddØ�d$�d%�d&�d'�d(�d)�d*eƒ eƒ e�d+ƒedƒe�d,ƒe	je	ed&�d-�ƒe	e�d.�d-�dœ�d/�gZÖe:dk	�r”eÖ ×e: <dŒ¡e: <d¡g¡ �d0d«„ eÖD ƒZØe! ÙeÚeØƒ¡ejPeÖeØd7��d1�d2„ ƒƒZÛe! ÙeÚeØd&d… ƒ¡ejPeÖd&d… eØd&d… d7��d3�d4„ ƒƒZÜeÜZÝ�d5�d6eeƒ e	jgZÞe:dk	�r@eÞ ße: <d¡¡ ejPeÞd=��d7�d8„ ƒZàeàZáejPe0jâd=��d9�d:„ ƒZãejPd¥ej]d§e! ^�d;¡dY�gd=��d<�d=„ ƒZäejP�d>ej]�d;e! ^�d;¡dY�gd=��d?�d@„ ƒZåejP�dAej]�d;e! ^�d;¡dY�gd=��dB�dC„ ƒZæeåZçejPe0jèd=��dD�dE„ ƒZéejPe0jêd=��dF�dG„ ƒZëejP�dHd¥ej]d§e! ^�d;¡dY�gd=��dI�dJ„ ƒZìejPe0jíd=��dK�dL„ ƒZîejPe0jïd=��dM�dN„ ƒZðejP�dOdœ�dP�dQ„ƒZñejPe0jòd=��dR�dS„ ƒZóejPe0jôd=��dT�dU„ ƒZõejPe0jöd=��dV�dW„ ƒZ÷ejPe0jød=��dX�dY„ ƒZùejPe0júd=��dZ�d[„ ƒZûejPe0jüd=��d\�d]„ ƒZýejPe0jþd=��d^�d_„ ƒZÿejPe0�j d=��d`�da„ ƒ�ZejPe0�jd=��db�dc„ ƒ�ZejPe0�j e0jô d=��dd�de„ ƒ�ZejPe0�j e0jô e0�j e0�j d=��df�dg„ ƒ�ZejPe0�jd=��dh�di„ ƒ�Z	ejPe0�j
d=��dj�dk„ ƒ�ZejPe0�jd=��dl�dm„ ƒ�ZejPe0�jd=��dn�do„ ƒ�ZejPe0�jd=��dp�dq„ ƒ�Z�dr�dsejg�dtgf�dr�dse&�j�dtgf�du�dse&jh�dtgf�dv�dwejg�dxgf�dyejgejgejggf�dyg f�dz�dsejgdŸgf�du�dsejg�d{gf�d|�d}ejg�d{gf�d~d&ejgdŸgf�dd&ejg�d{gf�d€ed&ƒejgedŸƒgfd¤dejgdgfd¤de&�jdgf�d�e� �d‚¡ejge� �dƒ¡gf�d„e,�d…ƒejge,�d†ƒgf�d‡e�dˆd&d&ƒejge�d‰d&d&ƒgf�dŠed&ƒejgedŸƒgf�d‹ed&ƒejgedŸƒgf�dŒe)�dˆƒe&jhe)�d‰ƒgf�d�e(dd&ƒejge(ddŸƒgfg�Ze��eŽ \�Z�ZejP�e�ed7��dŽ�d�„ ƒ�ZejP�d��d‘„ ƒ�ZejP�d’�d“�d”�d•�d–�d—�d˜gd=��d™�dš„ ƒ�ZejP�d›d«„ e&jJ�jD ƒd=��dœ�d�„ ƒ�ZejPd�džd6„ gd=��dŸ�d „ ƒ�Ze P¡ �d¡�d¢„ ƒ�ZejP�d£�d¤�d¥ejgejgejgfejge&jhdfejge&�jdfe&�je&�je&�jfgd=��d¦dœ�d§�d¨„ƒ�ZejPe0�je0�j e0�j!gd=��d©�dª„ ƒ�Z"ejPe0�j e0�j!gd=��d«�d¬„ ƒ�Z#ejPe0�je0�j!gd=��d­�d®„ ƒ�Z$ejPe0�je0�j gd=��d¯�d°„ ƒ�Z%ejPe0�j&e0�j gd=��d±�d²„ ƒ�Z'ejPe0�j(e0�j!gd=��d³�d´„ ƒ�Z)ejP�dµdœ�d¶�d·„ƒ�Z*ejP�dµdœ�d¸�d¹„ƒ�Z+�dº�d»g�Z,e:dk	�r�e, ße: <�dº¡¡ ejP�e,d=�ddœ�d¼�d½„ƒ�Z-dS (¾  a•  
This file is very long and growing, but it was decided to not split it yet, as
it's still manageable (2020-03-17, ~1.1k LoC). See gh-31989

Instead of splitting it was decided to define sections here:
- Configuration / Settings
- Autouse fixtures
- Common arguments
- Missing values & co.
- Classes
- Indices
- Series'
- DataFrames
- Operators & Operations
- Data sets/files
- Time zones
- Dtypes
- Misc
é    )Úannotations)Úabc)ÚdateÚdatetimeÚtimeÚ	timedeltaÚtimezone)ÚDecimalN)ÚCallableÚHashableÚIterator)ÚtzlocalÚtzutc)Ú
strategies)ÚFixedOffsetÚutc)ÚDatetimeTZDtypeÚIntervalDtype)Ú	DataFrameÚIntervalÚPeriodÚSeriesÚ	TimedeltaÚ	TimestampÚcompat)Úops)ÚIndexÚ
MultiIndexFTÚUTCÚNone©Úreturnc                 C  sd   | j dddd� | j dddd� | j dddd� | j d	dd
d� | j dddd� | j dddd� d S )Nú--skip-slowÚ
store_truezskip slow tests)ÚactionÚhelpú--skip-networkzskip network testsú	--skip-dbzskip db testsz--run-high-memoryzrun high memory testsú--only-slowzrun only slow testsú--strict-data-filesz0Fail if a test is skipped for missing data file.)Z	addoption)Úparser© r+   úH/home/sam/Atlas/atlas_env/lib/python3.8/site-packages/pandas/conftest.pyÚpytest_addoptionh   s      ÿýr-   zpytest.ItemÚstr)ÚitemÚpathÚmessager!   c                 C  s(   | j  |¡r$|  tj d|› �¡¡ dS )a‰  Ignore doctest warning.

    Parameters
    ----------
    item : pytest.Item
        pytest test item.
    path : str
        Module path to Python object, e.g. "pandas.core.frame.DataFrame.append". A
        warning will be filtered when item.name ends with in given path. So it is
        sufficient to specify e.g. "DataFrame.append".
    message : str
        Message to be filtered.
    zignore:N)ÚnameÚendswithÚ
add_markerÚpytestÚmarkÚfilterwarnings)r/   r0   r1   r+   r+   r,   Úignore_doctest_warningw   s    r8   c                 C  s.  |  d¡}|  d¡}|  d¡}|  d¡}tjjd|dftjjd|dftjjd|dfg}d	g}| D ]È}|  d
¡s||j ddd�r¨| tj d¡¡ |D ]\}	}
t||	|
ƒ q’d|j	krÀ| tjj
¡ |D ]B\}}}}||jkrÄ|rü| tj d|› �¡¡  �q| |¡ qÄ|r`d|jkr`| tj d¡¡ q`d S )Nr"   r(   r&   r'   ÚslowÚnetworkz	--networkÚdb)zmissing.mask_zero_div_zerozdivide by zero encounteredz--doctest-modulesz--doctest-cythonF)ÚdefaultÚadd_doctest_importsz/frame/zskipping due to zskipping due to --only-slow)Ú	getoptionr5   r6   r9   r:   r;   r4   Zusefixturesr8   ZnodeidZarraymanagerÚkeywordsÚskip)ÚitemsÚconfigZ	skip_slowZ	only_slowZskip_networkZskip_dbÚmarksZignored_doctest_warningsr/   r0   r1   r6   ZkwdZskip_if_foundZarg_namer+   r+   r,   Úpytest_collection_modifyitems‰   s8    



ý
þ ÿ

rD   Úci)ÚdeadlineZsuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndi�ÿÿÿéc   )ÚnÚ	normalizez%YearBegin YearEnd BYearBegin BYearEndéûÿÿÿé   é   é   )Z	min_valueZ	max_value)rH   rI   Úmonthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndièÿÿÿé   )rH   rI   ZstartingMonthc                 C  s   t | d< t| d< dS )z:
    Make `np` and `pd` names available for doctests.
    ÚnpÚpdN)rP   rQ   )Zdoctest_namespacer+   r+   r,   r=   é   s    r=   )Zautousec                   C  s   t  dd¡ dS )z<
    Configure settings for all tests and test modules.
    Zchained_assignmentÚraiseN)rQ   Z
set_optionr+   r+   r+   r,   Úconfigure_testsõ   s    rS   ÚindexÚcolumnsc                 C  s   dt | ƒ› �S ©Nzaxis=©Úrepr©Úxr+   r+   r,   Ú<lambda>   ó    r[   )ÚparamsÚidsc                 C  s   | j S )z@
    Fixture for returning the axis numbers of a DataFrame.
    ©Úparam©Úrequestr+   r+   r,   Úaxis   s    rc   c                 C  s   dt | ƒ› �S rV   rW   rY   r+   r+   r,   r[     r\   c                 C  s   | j S )zA
    Fixture for returning aliases of axis 1 of a DataFrame.
    r_   ra   r+   r+   r,   Úaxis_1  s    rd   )r]   c                 C  s   | j S )a…  
    Pass in the observed keyword to groupby for [True, False]
    This indicates whether categoricals should return values for
    values which are not in the grouper [False / None], or only values which
    appear in the grouper [True]. [None] is supported for future compatibility
    if we decide to change the default (and would need to warn if this
    parameter is not passed).
    r_   ra   r+   r+   r,   Úobserved  s    
re   c                 C  s   | j S )z6
    Boolean 'ordered' parameter for Categorical.
    r_   ra   r+   r+   r,   Úordered   s    rf   c                 C  s   | j S )z%
    Boolean 'skipna' parameter.
    r_   ra   r+   r+   r,   Úskipna(  s    rg   ÚfirstÚlastc                 C  s   | j S )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    r_   ra   r+   r+   r,   Úkeep0  s    rj   ZbothZneitherÚleftÚrightc                 C  s   | j S )zA
    Fixture for trying all interval 'inclusive' parameters.
    r_   ra   r+   r+   r,   Úinclusive_endpoints_fixture9  s    rm   c                 C  s   | j S )z<
    Fixture for trying all interval closed parameters.
    r_   ra   r+   r+   r,   ÚclosedA  s    rn   c                 C  s   | j S )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    r_   ra   r+   r+   r,   Úother_closedI  s    ro   ÚgzipÚbz2ÚzipÚxzÚtarZzstdZ	zstandard)rC   c                 C  s   | j S )zK
    Fixture for trying common compression types in compression tests.
    r_   ra   r+   r+   r,   ÚcompressionQ  s    ru   c                 C  s   | j S )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    r_   ra   r+   r+   r,   Úcompression_onlyc  s    rv   c                 C  s   | j S )z,
    Fixture that an array is writable.
    r_   ra   r+   r+   r,   Úwritableu  s    rw   ÚinnerÚouterc                 C  s   | j S )z:
    Fixture for trying all types of join operations.
    r_   ra   r+   r+   r,   Ú	join_type}  s    rz   ÚnlargestÚ	nsmallestc                 C  s   | j S )z1
    Fixture for trying all nselect methods.
    r_   ra   r+   r+   r,   Únselect_method…  s    r}   c                 C  s
   t | ƒjS ©N©ÚtypeÚ__name__rY   r+   r+   r,   r[   �  r\   c                 C  s   | j S )z/
    Fixture for each null type in pandas.
    r_   ra   r+   r+   r,   Únulls_fixture�  s    r‚   c                 C  s   | j S )zL
    Fixture for each null type in pandas, each null type exactly once.
    r_   ra   r+   r+   r,   Úunique_nulls_fixture›  s    rƒ   c                 C  s
   t | ƒjS r~   r   rY   r+   r+   r,   r[   §  r\   c                 C  s   | j S )z-
    Fixture for each NaT type in numpy.
    r_   ra   r+   r+   r,   Únp_nat_fixture§  s    r„   c                 C  s   | j S )z;
    Fixture to parametrize over DataFrame and Series.
    r_   ra   r+   r+   r,   Úframe_or_series¸  s    r…   Úseriesc                 C  s   | j S )zÑ
    Fixture to parametrize over Index and Series, made necessary by a mypy
    bug, giving an error:

    List item 0 has incompatible type "Type[Series]"; expected "Type[PandasObject]"

    See GH#29725
    r_   ra   r+   r+   r,   Úindex_or_seriesÀ  s    
r‡   Úarrayc                 C  s   | j S )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    r_   ra   r+   r+   r,   Úindex_or_series_or_arrayÑ  s    r‰   c                 C  s   | j S r~   )r�   rY   r+   r+   r,   r[   Ù  r\   c                 C  s   | j S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    r_   ra   r+   r+   r,   Úbox_with_arrayÙ  s    rŠ   c                  C  s   G dd„ dt ƒ} | S )z,
    Fixture for a dictionary subclass.
    c                   @  s   e Zd Zddœdd„ZdS )z"dict_subclass.<locals>.TestSubDictr   r    c                 _  s   t j| f|ž|Ž d S r~   )ÚdictÚ__init__)ÚselfÚargsÚkwargsr+   r+   r,   rŒ   ì  s    z+dict_subclass.<locals>.TestSubDict.__init__N)r�   Ú
__module__Ú__qualname__rŒ   r+   r+   r+   r,   ÚTestSubDictë  s   r’   )r‹   )r’   r+   r+   r,   Údict_subclasså  s    r“   c                  C  s   G dd„ dt jƒ} | S )z8
    Fixture for a non-mapping dictionary subclass.
    c                   @  s>   e Zd Zddœdd„Zdd„ Zddœdd	„Zd
dœdd„ZdS )z5non_dict_mapping_subclass.<locals>.TestNonDictMappingr   r    c                 S  s
   || _ d S r~   )Ú_data)r�   Zunderlying_dictr+   r+   r,   rŒ   ù  s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__c                 S  s   | j  |¡S r~   )r”   Ú__getitem__)r�   Úkeyr+   r+   r,   r•   ü  s    zAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__r   c                 S  s
   | j  ¡ S r~   )r”   Ú__iter__©r�   r+   r+   r,   r—   ÿ  s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Úintc                 S  s
   | j  ¡ S r~   )r”   Ú__len__r˜   r+   r+   r,   rš     s    z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__N)r�   r�   r‘   rŒ   r•   r—   rš   r+   r+   r+   r,   ÚTestNonDictMappingø  s   r›   )r   ÚMapping)r›   r+   r+   r,   Únon_dict_mapping_subclassò  s    r�   c                  C  s`   t  d¡} |  dd„ dd„ dd„ g¡ ¡ }|j dd„ |jjD ƒ¡|_|jjdd	d
gdd� |S )z„
    DataFrame with 3 level MultiIndex (year, month, day) covering
    first 100 business days from 2000-01-01 with random data
    éd   c                 S  s   | j S r~   )ÚyearrY   r+   r+   r,   r[     r\   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>c                 S  s   | j S r~   )rN   rY   r+   r+   r,   r[     r\   c                 S  s   | j S r~   )ÚdayrY   r+   r+   r,   r[     r\   c                 S  s   g | ]}|  d ¡‘qS )Úi8)Úastype)Ú.0Zlevr+   r+   r,   Ú
<listcomp>  s     zCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>rŸ   rN   r    T)Zinplace)ÚtmZmakeTimeDataFrameÚgroupbyÚsumrT   Z
set_levelsÚlevelsZ	set_names)ZtdfZymdr+   r+   r,   Ú/multiindex_year_month_day_dataframe_random_data  s
    
 r©   r   c                   C  sP   t ddddgdddggdddd	d	d
d
dddg
dd	d
dd	d	d
dd	d
g
gddgd�S )z;
    2-level MultiIndex, lexsorted, with string names.
    ÚfooÚbarÚbazÚquxÚoneÚtwoÚthreer   rL   é   é   rh   Úsecond)r¨   ÚcodesÚnames)r   r+   r+   r+   r,   Ú%lexsorted_two_level_string_multiindex  s
    .ýr¶   r   c                 C  s*   | }t tj dd¡|tdddgdd�d�S )	z2DataFrame with 2 level MultiIndex with random dataé
   r²   ÚAÚBÚCÚexp©r2   )rT   rU   )r   rP   ÚrandomÚrandnr   )r¶   rT   r+   r+   r,   Ú multiindex_dataframe_random_data%  s      ÿr¿   c                  C  sh   t ddddgƒ} t ddgƒ}t dddd	d
d
g¡}t ddddddg¡}ddg}t| |g||g|dd�S )zJ
    MultiIndex used to test the general functionality of this object
    rª   r«   r¬   r­   r®   r¯   r   rL   r±   r²   rh   r³   F)r¨   r´   rµ   Zverify_integrity)r   rP   rˆ   r   )Z
major_axisZ
minor_axisZmajor_codesZminor_codesZindex_namesr+   r+   r,   Ú_create_multiindex0  s    ürÀ   c                   C  s.   t jddgddgtjdddd�gd	d
dgd�S )zB
    MultiIndex with a level that is a tzaware DatetimeIndex.
    rL   r±   ÚaÚbÚ20130101r²   ú
US/Eastern)ZperiodsÚtzr®   r¯   r°   )rµ   )r   Zfrom_productrQ   Z
date_ranger+   r+   r+   r,   Ú_create_mi_with_dt64tz_levelD  s    þrÆ   rž   z
US/Pacific)rÅ   Úint8©ÚdtypeÚint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64Úfloat32Úfloat64r·   Ú	complex64Ú
complex128rª   r«   r¬   r±   r²   ZInt64ZUInt16ZFloat32Úbooleanzstring[python]) Ústringr   zdatetime-tzÚperiodr   ÚrangerÇ   rÊ   rË   rÌ   rÍ   rÎ   rÏ   rÐ   rÑ   rÒ   zbool-objectú
bool-dtyperÓ   rÔ   ZcategoricalÚintervalÚemptyÚtuplesúmi-with-dt64tz-levelÚmultiÚrepeatsZnullable_intZnullable_uintZnullable_floatZnullable_boolzstring-pythonzstring[pyarrow]zstring-pyarrowc                 C  s   t | j  ¡ S )zØ
    Fixture for many "simple" kinds of indices.

    These indices are unlikely to cover corner cases, e.g.
        - no names
        - no NaTs/NaNs
        - no values near implementation bounds
        - ...
    )Úindices_dictr`   Úcopyra   r+   r+   r,   rT   v  s    c                 C  s   g | ]\}}t |tƒs|‘qS r+   )Ú
isinstancer   ©r£   r–   Úvaluer+   r+   r,   r¤   Š  s    
 r¤   c                 C  s   | j }t|  ¡ S )z8
    index fixture, but excluding MultiIndex cases.
    )r`   rà   rá   )rb   r–   r+   r+   r,   Ú
index_flat‰  s    	rå   c                 C  sD   g | ]<\}}|  d ¡s|  d¡s|  d¡s|dkst|tƒs|‘qS )r™   ZuintÚfloat)rØ   rÛ   rß   rÙ   )Ú
startswithrâ   r   rã   r+   r+   r,   r¤   ›  s   



øc                 C  s„   t | j jdd�}|j}| jdkrd| ¡ }d|d dd…  |d< d|d dd…  |d< t |¡S d|d< d|d< t|ƒ|ƒS dS )	zÙ
    Fixture for indices with missing values.

    Integer-dtype and empty cases are excluded because they cannot hold missing
    values.

    MultiIndex is excluded because isna() is not defined for MultiIndex.
    T©Údeep)rÜ   rÝ   rÞ   r~   r   rL   Néÿÿÿÿ)rà   r`   rá   ÚvaluesÚtolistr   Úfrom_tuplesr€   )rb   ÚindÚvalsr+   r+   r,   Úindex_with_missingš  s    

rð   r   c                  C  s   t  ¡ } d| _| S )zC
    Fixture for Series of floats with Index of unique strings
    r†   )r¥   ZmakeStringSeriesr2   ©Úsr+   r+   r,   Ústring_seriesÄ  s    ró   c                  C  s   t  ¡ } d| _| S )zI
    Fixture for Series of dtype object with Index of unique strings
    Úobjects)r¥   ZmakeObjectSeriesr2   rñ   r+   r+   r,   Úobject_seriesÎ  s    rõ   c                  C  s   t  ¡ } d| _| S )z9
    Fixture for Series of floats with DatetimeIndex
    Úts)r¥   ZmakeTimeSeriesr2   rñ   r+   r+   r,   Údatetime_seriesØ  s    r÷   c                 C  s$   t | ƒ}tj |¡}t|| ddd�S )zHelper for the _series dictrÁ   F)rT   r2   rá   )ÚlenrP   r½   r¾   r   )rT   ÚsizeÚdatar+   r+   r,   Ú_create_seriesâ  s    rû   c                 C  s"   i | ]\}}d |› d�t |ƒ“qS )zseries-with-z-index©rû   )r£   Zindex_idrT   r+   r+   r,   Ú
<dictcomp>é  s   ÿ
 rý   c                 C  s   t | ƒS )zE
    Fixture for tests on series with changing types of indices.
    rü   ©rT   r+   r+   r,   Úseries_with_simple_indexï  s    rÿ   c               	   C  s`   ddddddddgddddddddgg} t | Ž }t |¡}tj d¡}t||d�}tj|d	< |S )
z:
    Fixture with a Series with a 2-level MultiIndex.
    r«   r¬   r­   rª   r®   r¯   é   rþ   r²   )rr   r   rí   rP   r½   r¾   r   ÚNaN)ZarraysrÜ   rT   rú   Zserr+   r+   r,   Úseries_with_multilevel_index÷  s    þ

r  c                 C  s$   i | ]}|j › d �tjd|d�“qS )z-seriesrÁ   )r2   rÉ   )r�   r¥   Zmake_rand_series)r£   rÉ   r+   r+   r,   rý     s   ÿ
 c                 C  s   t | j jdd�S )z|
    Fixture for tests on indexes, series and series with a narrow dtype
    copy to avoid mutation, e.g. setting .name
    Trè   )Ú_index_or_series_objsr`   rá   ra   r+   r+   r,   Úindex_or_series_obj  s    r  c                   C  s   t t ¡ ƒ d¡S )a6  
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']

                A  B  C  D
    vpBeWjM651  1  0  1  0
    5JyxmrP1En -1  0  0  0
    qEDaoD49U2 -1  1  0  0
    m66TkTfsFe  0  0  0  0
    EHPaNzEUFm -1  0 -1  0
    fpRJCevQhi  2  0  0  0
    OlQvnmfi3Q  0  0 -2  0
    ...        .. .. .. ..
    uB1FPlz4uP  0  0  0  1
    EcSe6yNzCU  0  0 -1  0
    L50VudaiI8 -1  1 -2  0
    y3bpw4nwIp  0 -1  0  0
    H0RdLLwrCT  1  1  0  0
    rY82K0vMwm  0  0  0  0
    1OPIUjnkjk  2  0  0  0

    [30 rows x 4 columns]
    rÌ   )r   r¥   ÚgetSeriesDatar¢   r+   r+   r+   r,   Ú	int_frame  s    r  c                   C  s   t t ¡ ƒS )aî  
    Fixture for DataFrame of floats with DatetimeIndex

    Columns are ['A', 'B', 'C', 'D']

                       A         B         C         D
    2000-01-03 -1.122153  0.468535  0.122226  1.693711
    2000-01-04  0.189378  0.486100  0.007864 -1.216052
    2000-01-05  0.041401 -0.835752 -0.035279 -0.414357
    2000-01-06  0.430050  0.894352  0.090719  0.036939
    2000-01-07 -0.620982 -0.668211 -0.706153  1.466335
    2000-01-10 -0.752633  0.328434 -0.815325  0.699674
    2000-01-11 -2.236969  0.615737 -0.829076 -1.196106
    ...              ...       ...       ...       ...
    2000-02-03  1.642618 -0.579288  0.046005  1.385249
    2000-02-04 -0.544873 -1.160962 -0.284071 -1.418351
    2000-02-07 -2.656149 -0.601387  1.410148  0.444150
    2000-02-08 -1.201881 -1.289040  0.772992 -1.445300
    2000-02-09  1.377373  0.398619  1.008453 -0.928207
    2000-02-10  0.473194 -0.636677  0.984058  0.511519
    2000-02-11 -0.965556  0.408313 -1.312844 -0.381948

    [30 rows x 4 columns]
    )r   r¥   ZgetTimeSeriesDatar+   r+   r+   r,   Údatetime_frame:  s    r  c                   C  s   t t ¡ ƒS )aù  
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].

                       A         B         C         D
    P7GACiRnxd -0.465578 -0.361863  0.886172 -0.053465
    qZKh6afn8n -0.466693 -0.373773  0.266873  1.673901
    tkp0r6Qble  0.148691 -0.059051  0.174817  1.598433
    wP70WOCtv8  0.133045 -0.581994 -0.992240  0.261651
    M2AeYQMnCz -1.207959 -0.185775  0.588206  0.563938
    QEPzyGDYDo -0.381843 -0.758281  0.502575 -0.565053
    r78Jwns6dn -0.653707  0.883127  0.682199  0.206159
    ...              ...       ...       ...       ...
    IHEGx9NO0T -0.277360  0.113021 -1.018314  0.196316
    lPMj8K27FA -1.313667 -0.604776 -1.305618 -0.863999
    qa66YMWQa5  1.110525  0.475310 -0.747865  0.032121
    yOa0ATsmcE -0.431457  0.067094  0.096567 -0.264962
    65znX3uRNG  1.528446  0.160416 -0.109635 -0.032987
    eCOBvKqf3e  0.235281  1.622222  0.781255  0.392871
    xSucinXxuV -1.263557  0.252799 -0.552247  0.400426

    [30 rows x 4 columns]
    )r   r¥   r  r+   r+   r+   r,   Úfloat_frameW  s    r  c                	   C  s>   t dddtjdgd dd�tjdgd dd�d	œt d¡d
�S )z€
    Fixture for DataFrame of float/int/string columns with RangeIndex
    Columns are ['a', 'b', 'c', 'float32', 'int32'].
    ç      ð?r±   rª   r·   rÑ   rÈ   rL   rË   )rÁ   rÂ   ÚcrÑ   rË   rþ   )r   rP   rˆ   Úaranger+   r+   r+   r,   Úmixed_type_framet  s    ûør  c                  C  s€   t dddƒt dddƒt dddƒt dddƒt dddƒt dddƒt dddƒt dddƒt dddƒt dddƒg
} ttj t| ƒ¡| d�S )zF
    Fixture for Series with a DatetimeIndex that has duplicates.
    iÐ  rL   r±   r²   é   rK   rþ   )r   r   rP   r½   r¾   rø   )Údatesr+   r+   r,   Ú(rand_series_with_duplicate_datetimeindex†  s    









ör  )rk   rl   gš™™™™™¹?g      à?z2012-01ÚM)Úfreqz	period[M]z
2012-02-01ÚDz	period[D]z
2011-01-01rÄ   iô  )Úsecondsztimedelta64[ns]c                 C  s   | j S r~   r_   ra   r+   r+   r,   Úea_scalar_and_dtypež  s    r  Ú__add__Ú__radd__Ú__sub__Ú__rsub__Ú__mul__Ú__rmul__Ú__floordiv__Ú__rfloordiv__Ú__truediv__Ú__rtruediv__Ú__pow__Ú__rpow__Ú__mod__Ú__rmod__c                 C  s   | j S )zD
    Fixture for dunder names for common arithmetic operations.
    r_   ra   r+   r+   r,   Úall_arithmetic_operatorsÄ  s    r#  c                 C  s   | j S )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    r_   ra   r+   r+   r,   Úall_binary_operatorsÌ  s    "r$  c                 C  s   | j S )z¬
    Fixture for operator and roperator arithmetic functions.

    Notes
    -----
    This includes divmod and rdivmod, whereas all_arithmetic_operators
    does not.
    r_   ra   r+   r+   r,   Úall_arithmetic_functionsñ  s    r%  Úcountr§   ÚmaxÚminZmeanÚprodZstdÚvarZmedianZkurtZskewZsemc                 C  s   | j S )z.
    Fixture for numeric reduction names.
    r_   ra   r+   r+   r,   Úall_numeric_reductions  s    r+  ÚallÚanyc                 C  s   | j S )z.
    Fixture for boolean reduction names.
    r_   ra   r+   r+   r,   Úall_boolean_reductions*  s    r.  c                 C  s   | j S )z>
    Fixture for all (boolean + numeric) reduction names.
    r_   ra   r+   r+   r,   Úall_reductions5  s    r/  c                 C  s   | j S )z;
    Fixture for operator module comparison functions.
    r_   ra   r+   r+   r,   Úcomparison_op=  s    r0  Ú__le__Ú__lt__Ú__ge__Ú__gt__c                 C  s   | j S )zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    r_   ra   r+   r+   r,   Úcompare_operators_no_eq_neN  s    
r5  Ú__and__Ú__rand__Ú__or__Ú__ror__Ú__xor__Ú__rxor__c                 C  s   | j S )zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    r_   ra   r+   r+   r,   Úall_logical_operators[  s    r<  ZcumsumZcumprodZcumminZcummaxc                 C  s   | j S )z0
    Fixture for numeric accumulation names
    r_   ra   r+   r+   r,   Úall_numeric_accumulationsl  s    r=  c                 C  s
   |   d¡S )zO
    Returns the configuration for the test setting `--strict-data-files`.
    r)   )r>   )Zpytestconfigr+   r+   r,   Ústrict_data_filesw  s    r>  zCallable[..., str])r>  r!   c                   s(   t j t j t¡d¡‰ ‡ ‡fdd„}|S )a=  
    Get the path to a data file.

    Parameters
    ----------
    path : str
        Path to the file, relative to ``pandas/tests/``

    Returns
    -------
    path including ``pandas/tests``.

    Raises
    ------
    ValueError
        If the path doesn't exist and the --strict-data-files option is set.
    Útestsc                    sH   t jjˆ f| žŽ }t j |¡sDˆr2td|› d�ƒ‚t d|› d�¡ |S )NzCould not find file z  and --strict-data-files is set.zCould not find Ú.)Úosr0   ÚjoinÚexistsÚ
ValueErrorr5   r@   )rŽ   r0   ©Z	BASE_PATHr>  r+   r,   Údeco”  s    
ÿzdatapath.<locals>.deco)rA  r0   rB  ÚdirnameÚ__file__)r>  rF  r+   rE  r,   Údatapath  s    
rI  c                 C  s   t  | ddddƒ¡S )z*
    The iris dataset as a DataFrame.
    Úiorú   Úcsvziris.csv)rQ   Zread_csv)rI  r+   r+   r,   Úiris¡  s    rL  z
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporez+01:15z-02:15z	UTC+01:15z	UTC-02:15i,  iÔþÿÿ)Úhoursrê   r¼   c                 C  s   g | ]}t |ƒ‘qS r+   rW   )r£   Úir+   r+   r,   r¤   Â  s     c                 C  s   | j S )zD
    Fixture for trying timezones including default (None): {0}
    r_   ra   r+   r+   r,   Útz_naive_fixtureÅ  s    rO  c                 C  s   | j S )z4
    Fixture for trying explicit timezones: {0}
    r_   ra   r+   r+   r,   Útz_aware_fixtureÎ  s    rP  r   zdateutil/UTCc                 C  s   | j S )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    r_   ra   r+   r+   r,   Úutc_fixtureà  s    rQ  c                 C  s   | j S )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    r_   ra   r+   r+   r,   Ústring_dtypeî  s    	rR  Úpyarrowc                 C  s   | j S )za
    Parametrized fixture for string dtypes.

    * 'string[python]'
    * 'string[pyarrow]'
    r_   ra   r+   r+   r,   Únullable_string_dtypeú  s    rT  Úpythonc                 C  s   | j S ©zb
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    r_   ra   r+   r+   r,   Ústring_storage
  s    rW  Znumpy_nullablec                 C  s   | j S rV  r_   ra   r+   r+   r,   Údtype_backend  s    rX  c                 C  s   | j S )zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    r_   ra   r+   r+   r,   Úbytes_dtype.  s    rY  c                 C  s   | j S )zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    r_   ra   r+   r+   r,   Úobject_dtype9  s    rZ  Úobjectc                 C  s   | j S )zo
    Parametrized fixture for string dtypes.
    * 'object'
    * 'string[python]'
    * 'string[pyarrow]'
    r_   ra   r+   r+   r,   Úany_string_dtypeD  s    r\  c                 C  s   | j S )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    r_   ra   r+   r+   r,   Údatetime64_dtypeU  s    r]  c                 C  s   | j S )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    r_   ra   r+   r+   r,   Útimedelta64_dtype`  s    r^  r   c                	   C  s   t dddddddd�S )z-
    Fixture emits fixed Timestamp.now()
    iå  rL   rM   r  é   é   )rŸ   rN   r    ÚhourÚminuter³   Úmicrosecond)r   r+   r+   r+   r,   Úfixed_now_tsk  s          ÿrd  c                 C  s   | j S )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    r_   ra   r+   r+   r,   Úfloat_numpy_dtypeu  s    	re  c                 C  s   | j S )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    r_   ra   r+   r+   r,   Úfloat_ea_dtype�  s    rf  c                 C  s   | j S )z~
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    r_   ra   r+   r+   r,   Úany_float_dtypeŒ  s    rg  c                 C  s   | j S )zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    r_   ra   r+   r+   r,   Úcomplex_dtypeš  s    	rh  c                 C  s   | j S )z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    r_   ra   r+   r+   r,   Úany_signed_int_numpy_dtype¦  s    ri  c                 C  s   | j S )zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    r_   ra   r+   r+   r,   Úany_unsigned_int_numpy_dtype´  s    
rj  c                 C  s   | j S )z³
    Parameterized fixture for any integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    r_   ra   r+   r+   r,   Úany_int_numpy_dtypeÁ  s    rk  c                 C  s   | j S )z²
    Parameterized fixture for any nullable integer dtype.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    r_   ra   r+   r+   r,   Úany_int_ea_dtypeÓ  s    rl  c                 C  s   | j S )a.  
    Parameterized fixture for any nullable integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    r_   ra   r+   r+   r,   Úany_int_dtypeä  s    rm  c                 C  s   | j S )zî
    Parameterized fixture for any nullable integer dtype and
    any float ea dtypes.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    r_   ra   r+   r+   r,   Úany_numeric_ea_dtypeþ  s    rn  c                 C  s   | j S )aÚ  
    Parameterized fixture for any nullable integer dtype and
    any float ea dtypes.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    * 'uint8[pyarrow]'
    * 'int8[pyarrow]'
    * 'uint16[pyarrow]'
    * 'int16[pyarrow]'
    * 'uint32[pyarrow]'
    * 'int32[pyarrow]'
    * 'uint64[pyarrow]'
    * 'int64[pyarrow]'
    * 'float32[pyarrow]'
    * 'float64[pyarrow]'
    r_   ra   r+   r+   r,   Úany_numeric_ea_and_arrow_dtype  s     ro  c                 C  s   | j S )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    r_   ra   r+   r+   r,   Úany_signed_int_ea_dtype7  s    
rp  c                 C  s   | j S )zí
    Parameterized fixture for any (purely) real numeric dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    r_   ra   r+   r+   r,   Úany_real_numpy_dtypeD  s    rq  c                 C  s   | j S )a  
    Parameterized fixture for any (purely) real numeric dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'

    and associated ea dtypes.
    r_   ra   r+   r+   r,   Úany_real_numeric_dtypeY  s    rr  c                 C  s   | j S )aÌ  
    Parameterized fixture for all numpy dtypes.

    * bool
    * 'bool'
    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    * complex
    * 'complex64'
    * 'complex128'
    * str
    * 'str'
    * 'U'
    * bytes
    * 'bytes'
    * 'datetime64[ns]'
    * 'M8[ns]'
    * 'timedelta64[ns]'
    * 'm8[ns]'
    * object
    * 'object'
    r_   ra   r+   r+   r,   Úany_numpy_dtypep  s    "rs  c                 C  s   | j S )a¥  
    Parameterized fixture for all numeric dtypes.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    * complex
    * 'complex64'
    * 'complex128'
    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    r_   ra   r+   r+   r,   Úany_numeric_dtype•  s    rt  rÖ   rÁ   r
  ÚmixedÚbytesó   aó   crÛ   zmixed-integerg       @Zfloatingr	  Úintegerzmixed-integer-floatÚdecimalÚ
datetime64z
2013-01-01z
2018-01-01r   rÃ   Z20180101r   iÝ  iâ  r   r   r×   rÚ   c                 C  s    | j \}}tj|td�}||fS )aŽ  
    Fixture for all inferred dtypes from _libs.lib.infer_dtype

    The covered (inferred) types are:
    * 'string'
    * 'empty'
    * 'bytes'
    * 'mixed'
    * 'mixed-integer'
    * 'mixed-integer-float'
    * 'floating'
    * 'integer'
    * 'decimal'
    * 'boolean'
    * 'datetime64'
    * 'datetime'
    * 'date'
    * 'timedelta'
    * 'time'
    * 'period'
    * 'interval'

    Returns
    -------
    inferred_dtype : str
        The string for the inferred dtype from _libs.lib.infer_dtype
    values : np.ndarray
        An array of object dtype that will be inferred to have
        `inferred_dtype`

    Examples
    --------
    >>> from pandas._libs import lib
    >>>
    >>> def test_something(any_skipna_inferred_dtype):
    ...     inferred_dtype, values = any_skipna_inferred_dtype
    ...     # will pass
    ...     assert lib.infer_dtype(values, skipna=True) == inferred_dtype
    rÈ   )r`   rP   rˆ   r[  )rb   Zinferred_dtyperë   r+   r+   r,   Úany_skipna_inferred_dtypeÖ  s    )
r|  c                  C  s>   t jddd� ddlm}  ddlm} |ƒ }d|j_| |d�S )	zj
    Get an instance of IPython.InteractiveShell.

    Will raise a skip if IPython is not installed.
    ZIPythonz6.0.0)Z
minversionr   )ÚInteractiveShell)ÚConfigz:memory:)rB   )r5   ÚimportorskipZIPython.core.interactiveshellr}  Ztraitlets.configr~  ZHistoryManagerZ	hist_file)r}  r~  r
  r+   r+   r,   Úip	  s    r€  ZbsrZcooZcscZcsrZdiaZdokZlilc                 C  s   ddl m} t|| jd ƒS )z-
    Yields scipy sparse matrix classes.
    r   )ÚsparseZ_matrix)Zscipyr�  Úgetattrr`   )rb   r�  r+   r+   r,   Úspmatrix  s    rƒ  c                 C  s6   g | ].}t ttj|ƒtjjƒr|d krttj|ƒ‘qS )ÚTick)Ú
issubclassr‚  rQ   Úoffsetsr„  )r£   Úor+   r+   r,   r¤   '  s    þc                 C  s   | j S )zN
    Fixture for Tick based datetime offsets available for a time series.
    r_   ra   r+   r+   r,   Útick_classes&  s    rˆ  c                 C  s   | S r~   r+   rY   r+   r+   r,   r[   4  r\   c                 C  s   | j S )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    r_   ra   r+   r+   r,   Úsort_by_key4  s    r‰  c                  c  sx   t  d¡ ddlm}  ddlm} ddlm} G dd„ d|ƒ}| d|d	d
� |ƒ V  | dd ¡ d |j	d< |j
 ¡  d S )NÚfsspecr   )Úregister_implementation)ÚMemoryFileSystem)Ú	_registryc                      s,   e Zd ZdZdgZddœ‡ fdd„Z‡  ZS )z fsspectest.<locals>.TestMemoryFSÚtestmemNr   r    c                   s$   |  dd ¡| jd< tƒ jf |Ž d S )NÚtestr   )Úpopr�  ÚsuperrŒ   )r�   r�   ©Ú	__class__r+   r,   rŒ   H  s    z)fsspectest.<locals>.TestMemoryFS.__init__)r�   r�   r‘   Úprotocolr�  rŒ   Ú__classcell__r+   r+   r’  r,   ÚTestMemoryFSD  s   r–  rŽ  T)Úclobber)r5   r  rŠ  r‹  Zfsspec.implementations.memoryrŒ  Zfsspec.registryr�  r�  r�  ÚstoreÚclear)r‹  rŒ  Úregistryr–  r+   r+   r,   Ú
fsspectest=  s    

r›  )rª   NN)ZEgonZVenkmanN)ÚNCC1701Drœ  rœ  z#tuple[Hashable, Hashable, Hashable]c                 C  s   | j S )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    r_   ra   r+   r+   r,   rµ   S  s    rµ   c                 C  s   | j S )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    r_   ra   r+   r+   r,   Úindexer_slif  s    r�  c                 C  s   | j S )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    r_   ra   r+   r+   r,   Ú
indexer_lin  s    rž  c                 C  s   | j S )z8
    Parametrize over __setitem__, iloc.__setitem__
    r_   ra   r+   r+   r,   Ú
indexer_siv  s    rŸ  c                 C  s   | j S )z7
    Parametrize over __setitem__, loc.__setitem__
    r_   ra   r+   r+   r,   Ú
indexer_sl~  s    r   c                 C  s   | j S )z:
    Parametrize over at.__setitem__, loc.__setitem__
    r_   ra   r+   r+   r,   Ú
indexer_al†  s    r¡  c                 C  s   | j S )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    r_   ra   r+   r+   r,   Úindexer_ialŽ  s    r¢  Úboolc                   C  s   t jjjdkS )z>
    Fixture to check if the array manager is being used.
    rˆ   )rQ   ÚoptionsÚmodeÚdata_managerr+   r+   r+   r,   Úusing_array_manager–  s    r§  c                   C  s   t jjjot jjjdkS )z7
    Fixture to check if Copy-on-Write is enabled.
    Úblock)rQ   r¤  r¥  Zcopy_on_writer¦  r+   r+   r+   r,   Úusing_copy_on_writež  s    r©  zEurope/Warsawzdateutil/Europe/Warsawc                 C  s   | j S )zE
    tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
    r_   ra   r+   r+   r,   Úwarsaw«  s    rª  (.  Ú__doc__Ú
__future__r   Úcollectionsr   r   r   r   r   r   rz  r	   ÚoperatorrA  Útypingr
   r   r   Zdateutil.tzr   r   Z
hypothesisr   ÚstÚnumpyrP   r5   Zpytzr   r   Zpandas.util._test_decoratorsÚutilZ_test_decoratorsÚtdZpandas.core.dtypes.dtypesr   r   ZpandasrQ   r   r   r   r   r   r   r   Zpandas._testingZ_testingr¥   Zpandas.corer   Zpandas.core.indexes.apir   r   rS  ÚpaÚImportErrorZhas_pyarrowZzoneinfoZPY39ZZoneInfoZZoneInfoNotFoundErrorr-   r8   rD   ÚsettingsZregister_profileZHealthCheckZtoo_slowZload_profileÚsplitr2   r‚  Ztseriesr†  ÚclsZregister_type_strategyZbuildsZintegersZbooleansZfixturer=   rS   rc   Z
axis_framerd   re   rf   rg   rj   rm   rn   ro   r`   Z
skip_if_noru   rv   rw   rz   r}   ZNULL_OBJECTSr‚   Znulls_fixture2ÚnanZNaTrƒ   Zunique_nulls_fixture2ZNP_NAT_OBJECTSr„   Znp_nat_fixture2r…   r‡   Zindex_or_series2rˆ   r‰   rŠ   Zbox_with_array2r“   r�   r©   r¶   r¿   rÀ   rÆ   ZmakeStringIndexZmakeDateIndexZmakePeriodIndexZmakeTimedeltaIndexZmakeRangeIndexZmakeIntIndexZmakeUIntIndexZmakeFloatIndexZmakeBoolIndexr¢   r[  r½   r¾   ZmakeNumericIndexZmakeCategoricalIndexZmakeIntervalIndexrí   rr   r  r£  rà   ÚidxÚkeysrT   Zindex_fixture2rA   rå   Zindex_flat2rð   ró   rõ   r÷   rû   Z_seriesrÿ   r  ZNARROW_NP_DTYPESZ_narrow_seriesr  r  r  r  r  r  r  r  Z_all_arithmetic_operatorsr#  ÚaddZraddÚsubZrsubÚmulZrmulÚtruedivZrtruedivÚfloordivZ	rfloordivÚmodZrmodÚpowZrpowÚeqÚneÚltÚleÚgtÚgeÚand_Zrand_ÚxorZrxorÚor_Zror_r$  r%  Z_all_numeric_reductionsr+  Z_all_boolean_reductionsr.  Z_all_reductionsr/  r0  r5  r<  Z_all_numeric_accumulationsr=  r>  rI  rL  Z	TIMEZONESÚextendZTIMEZONE_IDSZparametrize_fixture_docr.   rO  rP  Ztz_aware_fixture2Z_UTCSÚappendrQ  Zutc_fixture2ZSTRING_DTYPESrR  rT  rW  rX  Zstring_storage2ZBYTES_DTYPESrY  ZOBJECT_DTYPESrZ  r\  ZDATETIME64_DTYPESr]  ZTIMEDELTA64_DTYPESr^  rd  ZFLOAT_NUMPY_DTYPESre  ZFLOAT_EA_DTYPESrf  ZALL_FLOAT_DTYPESrg  ZCOMPLEX_DTYPESrh  ZSIGNED_INT_NUMPY_DTYPESri  ZUNSIGNED_INT_NUMPY_DTYPESrj  ZALL_INT_NUMPY_DTYPESrk  ZALL_INT_EA_DTYPESrl  ZALL_INT_DTYPESrm  rn  ZALL_INT_PYARROW_DTYPES_STR_REPRZFLOAT_PYARROW_DTYPES_STR_REPRro  ZSIGNED_INT_EA_DTYPESrp  ZALL_REAL_NUMPY_DTYPESrq  ZALL_REAL_DTYPESrr  ZALL_NUMPY_DTYPESrs  ZALL_NUMERIC_DTYPESrt  ZNAr{  Z_any_skipna_inferred_dtyper^   Ú_r|  r€  rƒ  Ú__all__rˆ  r‰  r›  rµ   ÚsetitemÚlocZilocr�  rž  rŸ  r   Úatr¡  Ziatr¢  r§  r©  Zwarsawsrª  r+   r+   r+   r,   Ú<module>   s8  $	

	1ö ÿ
üþ

üþ










ùÿ
úÿ
















à"
ÿÿ
	þÿ
			þþ


þ÷ÿ
ò

æÿ
òÿ
ô



úÿ
ÿ

!î


þÿ
þÿ
þÿ

ýÿ


	
ÿþýÿ$#$$ç2&	þÿøÿ
