a
    >PÎj&»  ã                '   @   st  d 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 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( ddl)m*Z+ ddl,m-Z- ddl.m/Z/m0Z0 zddl1Z2W n e3�y.   dZ4Y n0 [2dZ4dZ5e"j6j7�rvddl5Z5ze5 8d¡ W n e5j9�yt   dZ5Y n0 ej: ;d¡Z<ddœdd„Z=ej>e?e?ddœdd„Z@dd„ ZAejBjCddejDjEfd� ejB Fd¡ d G¡ D ]8ZHeIe"jJjKeHƒZLe MeLejNeLe Odd¡e P¡ d�¡ �qÚd  G¡ D ]DZHeIe"jJjKeHƒZLe MeLejNeLe Od!d"¡e P¡ ejOd#d$d%�d&�¡ �qd' G¡ D ]DZHeIe"jJjKeHƒZLe MeLejNeLe Od(d)¡e P¡ ejOd#d$d%�d*�¡ �qjejQddœd+d,„ƒZRejQdd-�ddœd.d/„ƒZSejQg d0¢d1d2„ d3�d4d5„ ƒZTeTZUejQd#d6gd7d2„ d3�d8d9„ ƒZVejQg d:¢d;�d<d=„ ƒZWejQg d:¢d;�d>d?„ ƒZXejQg d@¢d;�dAdB„ ƒZYejQg dC¢d;�dDdE„ ƒZZejQg dF¢d;�dGdH„ ƒZ[ejQg dF¢d;�dIdJ„ ƒZ\ejQddKdLdMdNdOej]dPe ^dQ¡dR�gd;�dSdT„ ƒZ_ejQdKdLdMdNdOej]dPe ^dQ¡dR�gd;�dUdV„ ƒZ`ejQddgd;�dWdX„ ƒZaejQg dY¢d;�dZd[„ ƒZbejQd\d]gd;�d^d_„ ƒZcejQe+jdd`d2„ d3�dadb„ ƒZeeeZfejQdejge"jhgd;�dcdd„ ƒZieiZjejQe+jkded2„ d3�dfdg„ ƒZlelZmejQe#e&gd;�dhdi„ ƒZnejQe/e&gdjdkgd3�dldm„ ƒZoeoZpejQe/e&e"jqgg dn¢d3�dodp„ ƒZrejQe/e&e#e"jqgdqd2„ d3�drds„ ƒZsesZtejQdtdu„ ƒZuejQdvdw„ ƒZvejQdxdy„ ƒZwejQe0dœdzd{„ƒZxejQe#dœd|d}„ƒZyd~d„ Zzd€d�„ Z{e+ |d‚¡e+ }d‚¡e+j}d‚dƒd„�e+ ~d‚¡e+ d‚¡e+ €d‚¡e+ �d‚¡e+ ‚d‚¡e+ ƒd‚¡e+ ƒd‚¡ „d…¡e+ ƒd‚¡ „d†¡e+j…d‚d‡dˆ�e+j…d‚d‰dˆ�e+j…d‚dŠdˆ�e+j…d‚d‹dˆ�e+j…d‚dŒdˆ�e+j…d‚d�dˆ�e+j…d‚dŽdˆ�e+j…d‚d�dˆ�e+j…d‚d�dˆ�e+j…d‚d‘dˆ�e+ †d’¡ „e‡¡e/ejˆ ‰d’¡dk ƒe+ Šd‚¡e+ ‹d‚¡e/g ƒe0 Œe�g d“¢g d”¢ƒ¡e{ƒ ezƒ e/g d•¢ƒe/e Žd‚¡d–dˆ�e/e Žd‚¡d—dˆ�e/e Žd‚¡d˜dˆ�e/e Žd‚¡ „e�¡d™dˆ�e/e"jqe+ |d‚¡dšdˆ�ƒd›œ#Z�e4�rfe/e"jqe+ |d‚¡dœdˆ�ƒZ‘e‘e�d�< ejQe� ’¡ d;�dždj„ ƒZ“e“Z”ejQdŸd „ e�D ƒd;�d¡d¢„ ƒZ•e•Z–ejQd£d „ e�D ƒd;�d¤d¥„ ƒZ—ejQe&dœd¦d§„ƒZ˜ejQe&dœd¨d©„ƒZ™ejQe&dœdªd«„ƒZšd¬d­„ Z›d®d¯„ e� œ¡ D ƒZ�ejQe&dœd°d±„ƒZžejQe&dœd²d³„ƒZŸd´d¯„ e+j D ƒZ¡i e�¥e�¥e¡¥Z¢ejQe¢ ’¡ d;�dµd¶„ ƒZ£ejQe#dœd·d¸„ƒZ¤ejQe#dœd¹dº„ƒZ¥ejQe#dœd»d¼„ƒZ¦ejQe#dœd½d¾„ƒZ§ejQe&dœd¿dÀ„ƒZ¨ejQe$dd"dÁ�e d‡dÂƒfe$dÃdÄdÁ�e d�dÂƒ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©g dÓ¢ZªejQeªd;�dÔdÕ„ ƒZ«ejQe
j¬e-j­e
j®e-j¯e
j°e-j±e
j²e-j³e
j´e-jµe
j¶e-j·e
j¸e-j¹e
jºe
j»e
j¼e
j½e
j¾e
j¿e
jÀe-jÁe
jÂe-jÃe
jÄe-jÅgd;�dÖd×„ ƒZÆejQe
j¬e-j­e
j®e-j¯e
j°e-j±e
j²e-j³e
j´e-jµe
j¶e-j·e
j¸e-j¹gd;�dØdÙ„ ƒZÇg dÚ¢ZÈejQeÈd;�dÛdÜ„ ƒZÉdÝdÞgZÊejQeÊd;�dßdà„ ƒZËeÈeÊ ZÌejQeÌd;�dádâ„ ƒZÍejQe
jºe
j»e
j¾e
j¿e
j¼e
j½gd;�dãdä„ ƒZÎejQg då¢d;�dædç„ ƒZÏejQg dè¢d;�dédê„ ƒZÐejQdëdì„ ƒZÑejQe?edíe?f dîœdïdð„ƒZÒejQe#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Ôe5du�ržeÔ Õe5 8dƒ¡e5 8d¡g¡ �d d „ eÔD ƒZÖe ×e?eÖƒ¡ejQeÔeÖd3��d�d„ ƒƒZØe ×e?eÖd#d… ƒ¡ejQeÔd#d… eÖd#d… d3��d�d„ ƒƒZÙeÙZÚ�d�deeƒ ejgZÛe5du�rJeÛ Üe5 8d¡¡ ejQeÛd;��d�d„ ƒZÝeÝZÞejQe+jßd;��d	�d
„ ƒZàejQdšej]dœej^�d�d�d�dR�gd;��d�d„ ƒZáejQ�dej]�dej^�d�d�d�dR�gd;��d�d„ ƒZâeâZãejQe+jäd;��d�d„ ƒZåejQe+jæd;��d�d„ ƒZçejQ�ddšej]dœej^�d�d�d�dR�gd;��d�d„ ƒZèejQe+jéd;��d�d„ ƒZêejQe+jëd;��d�d„ ƒZìejQe(dœ�d�d„ƒZíejQe+jîd;��d �d!„ ƒZïejQe+jðd;��d"�d#„ ƒZñejQe+jîe+jð d;��d$�d%„ ƒZòejQe+jód;��d&�d'„ ƒZôejQe+jõd;��d(�d)„ ƒZöejQe+j÷d;��d*�d+„ ƒZøejQe+jùd;��d,�d-„ ƒZúejQe+jûd;��d.�d/„ ƒZüejQe+jùe+jû d;��d0�d1„ ƒZýejQe+jûe+jð d;��d2�d3„ ƒZþejQe+jÿd;��d4�d5„ ƒ�Z ejQe+�jd;��d6�d7„ ƒ�ZejQe+�jd;��d8�d9„ ƒ�ZejQe+�je+jó e+jû e+jð d;��d:�d;„ ƒ�Z�d<�d=ejg�d>gf�d<�d=e"�j�d>gf�d?�d=e"jh�d>gf�d@�dAejg�dBgf�dCejgejgejggf�dCg f�dD�d=ejg�dEgf�d?�d=ejg�dFgf�dG�dHejg�dFgf�dId#ejg�dEgf�dJd#ejg�dFgf�dKe	d#ƒejge	�dEƒgfd™dejgdgfd™de"�jdgf�dLe� �dM¡ejge� �dN¡gf�dOe(�dPƒejge(�dQƒgf�dRe�dSd#d#ƒejge�dTd#d#ƒgf�dUed#ƒejge�dEƒgf�dVed#ƒejge�dEƒgf�dWe%�dSƒe"jhe%�dTƒgf�dXe$dd#ƒejge$d�dEƒgfg�Ze��eŽ \�Z	�Z
ejQ�e�e	d3��dY�dZ„ ƒ�ZejQ�d[�d\„ ƒ�ZejQg �d]¢d;��d^�d_„ ƒ�ZejQ�d`d „ e"jK�jD ƒd;��da�db„ ƒ�ZejQd�dcd2„ gd;��dd�de„ ƒ�Ze Q¡ �df�dg„ ƒ�ZejQ�dh�di�djejgejgejgfejge"jhdfejge"�jdfe"�je"�je"�jfgd;��dk�dl„ ƒ�ZejQe+�je+�je+�jgd;��dm�dn„ ƒ�ZejQe+�je+�jgd;��do�dp„ ƒ�ZejQe+�je+�jgd;��dq�dr„ ƒ�ZejQe+�je+�jgd;��ds�dt„ ƒ�ZejQe+�je+�jgd;��du�dv„ ƒ�ZejQe+�je+�jgd;��dw�dx„ ƒ�ZejQ�dy�dz„ ƒ�ZejQe�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
é    )Úabc)ÚdateÚdatetimeÚtimeÚ	timedeltaÚtimezone)ÚDecimalN)ÚCallable)ÚtzlocalÚtzutc)Ú
strategies)ÚFixedOffsetÚutc)ÚDatetimeTZDtypeÚIntervalDtype)Ú	DataFrameÚIntervalÚPeriodÚSeriesÚ	TimedeltaÚ	Timestamp)Úops)ÚIndexÚ
MultiIndexFTÚUTCz3ignore:Promotion of numbers and bools:FutureWarning©Ú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&   ú_/mounts/lovelace/software/anaconda3/envs/metadmg/lib/python3.9/site-packages/pandas/conftest.pyÚpytest_addoptionf   s    ÿýr(   )Ú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)   r*   r+   r&   r&   r'   Úignore_doctest_warningu   s    r2   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}g d	¢}| D ]Ô}|  d
¡s~|j ddd�rª| tj d¡¡ |D ]\}	}
t||	|
ƒ q”d|j	v rÂ| tjj
¡ | t¡ |D ]D\}}}}||jv rÐ|�r
| tj d|› �¡¡  �q| |¡ qÐ|rbd|jvrb| tj d¡¡ qbd S )Nr   r#   r!   r"   ÚslowÚnetworkz	--networkÚdb)	)zDataFrame.appendz%The frame.append method is deprecated)zSeries.appendz&The series.append method is deprecated)zdtypes.common.is_categoricalzis_categorical is deprecated)zCategorical.replacez!Categorical.replace is deprecated)zdtypes.common.is_extension_typez!'is_extension_type' is deprecated)zIndex.is_mixedzIndex.is_mixed is deprecated)zMultiIndex._is_lexsortedz%MultiIndex.is_lexsorted is deprecated)zmissing.mask_zero_div_zerozdivide by zero encountered)z$_validators.validate_axis_style_argszUse named argumentsz--doctest-modulesz--doctest-cythonF)ÚdefaultÚadd_doctest_importsz/frame/zskipping due to zskipping due to --only-slow)Ú	getoptionr/   r0   r3   r4   r5   r.   Zusefixturesr2   ZnodeidZarraymanagerÚ suppress_npdev_promotion_warningÚkeywordsÚskip)ÚitemsÚconfigZ	skip_slowZ	only_slowZskip_networkZskip_dbÚmarksZignored_doctest_warningsr)   r*   r+   r0   ZkwdZskip_if_foundZarg_namer&   r&   r'   Úpytest_collection_modifyitems‡   s6    



ýÿ


r?   Úci)ÚdeadlineZsuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndi�ÿÿÿéc   )ÚnÚ	normalizez%YearBegin YearEnd BYearBegin BYearEndéûÿÿÿé   é   é   )Z	min_valueZ	max_value)rC   rD   Úmonthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndièÿÿÿé   )rC   rD   ZstartingMonthc                 C   s   t | d< t| d< dS )z:
    Make `np` and `pd` names available for doctests.
    ÚnpÚpdN)rK   rL   )Zdoctest_namespacer&   r&   r'   r7   ò   s    r7   )Zautousec                   C   s   t  dd¡ dS )z<
    Configure settings for all tests and test modules.
    Zchained_assignmentÚraiseN)rL   Z
set_optionr&   r&   r&   r'   Úconfigure_testsþ   s    rN   )r   rG   ÚindexÚcolumnsc                 C   s   dt | ƒ› �S ©Nzaxis=©Úrepr©Úxr&   r&   r'   Ú<lambda>	  ó    rV   )ÚparamsÚidsc                 C   s   | j S )z@
    Fixture for returning the axis numbers of a DataFrame.
    ©Úparam©Úrequestr&   r&   r'   Úaxis	  s    r^   rP   c                 C   s   dt | ƒ› �S rQ   rR   rT   r&   r&   r'   rV     rW   c                 C   s   | j S )zA
    Fixture for returning aliases of axis 1 of a DataFrame.
    rZ   r\   r&   r&   r'   Úaxis_1  s    r_   )TFN)rX   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).
    rZ   r\   r&   r&   r'   Úobserved  s    
r`   c                 C   s   | j S )z6
    Boolean 'ordered' parameter for Categorical.
    rZ   r\   r&   r&   r'   Úordered)  s    ra   )ÚfirstÚlastFc                 C   s   | j S )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    rZ   r\   r&   r&   r'   Úkeep1  s    rd   )ÚbothÚneitherÚleftÚrightc                 C   s   | j S )zA
    Fixture for trying all interval 'inclusive' parameters.
    rZ   r\   r&   r&   r'   Úinclusive_endpoints_fixture:  s    ri   )rg   rh   re   rf   c                 C   s   | j S )z<
    Fixture for trying all interval closed parameters.
    rZ   r\   r&   r&   r'   ÚclosedB  s    rj   c                 C   s   | j S )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    rZ   r\   r&   r&   r'   Úother_closedJ  s    rk   ÚgzipÚbz2ÚzipÚxzÚtarZzstdZ	zstandard)r>   c                 C   s   | j S )zK
    Fixture for trying common compression types in compression tests.
    rZ   r\   r&   r&   r'   ÚcompressionR  s    rq   c                 C   s   | j S )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    rZ   r\   r&   r&   r'   Úcompression_onlyd  s    rr   c                 C   s   | j S )z,
    Fixture that an array is writable.
    rZ   r\   r&   r&   r'   Úwritablev  s    rs   )ÚinnerÚouterrg   rh   c                 C   s   | j S )z:
    Fixture for trying all types of join operations.
    rZ   r\   r&   r&   r'   Ú	join_type~  s    rv   ÚnlargestÚ	nsmallestc                 C   s   | j S )z1
    Fixture for trying all nselect methods.
    rZ   r\   r&   r&   r'   Únselect_method†  s    ry   c                 C   s
   t | ƒjS ©N©ÚtypeÚ__name__rT   r&   r&   r'   rV   ‘  rW   c                 C   s   | j S )z/
    Fixture for each null type in pandas.
    rZ   r\   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.
    rZ   r\   r&   r&   r'   Úunique_nulls_fixtureœ  s    r   c                 C   s
   t | ƒjS rz   r{   rT   r&   r&   r'   rV   ¨  rW   c                 C   s   | j S )z-
    Fixture for each NaT type in numpy.
    rZ   r\   r&   r&   r'   Únp_nat_fixture¨  s    r€   c                 C   s   | j S )z;
    Fixture to parametrize over DataFrame and Series.
    rZ   r\   r&   r&   r'   Úframe_or_series¹  s    r�   rO   Ú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
    rZ   r\   r&   r&   r'   Úindex_or_seriesÂ  s    rƒ   )rO   r‚   Úarrayc                 C   s   | j S )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    rZ   r\   r&   r&   r'   Úindex_or_series_or_arrayÕ  s    r…   c                 C   s   | j S rz   )r}   rT   r&   r&   r'   rV   Ý  rW   c                 C   s   | j S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    rZ   r\   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>.TestSubDictNr   c                 _   s   t j| g|¢R i |¤Ž d S rz   )ÚdictÚ__init__)ÚselfÚargsÚkwargsr&   r&   r'   rˆ   ð  s    z+dict_subclass.<locals>.TestSubDict.__init__)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                   @   s2   e Zd Zddœdd„Zdd„ Zdd„ Zd	d
„ ZdS )z5non_dict_mapping_subclass.<locals>.TestNonDictMappingNr   c                 S   s
   || _ d S rz   )Ú_data)r‰   Zunderlying_dictr&   r&   r'   rˆ   ý  s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__c                 S   s   | j  |¡S rz   )r�   Ú__getitem__)r‰   Úkeyr&   r&   r'   r‘      s    zAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__c                 S   s
   | j  ¡ S rz   )r�   Ú__iter__©r‰   r&   r&   r'   r“     s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__c                 S   s
   | j  ¡ S rz   )r�   Ú__len__r”   r&   r&   r'   r•     s    z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__)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g d¢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 rz   )ÚyearrT   r&   r&   r'   rV     rW   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>c                 S   s   | j S rz   )rI   rT   r&   r&   r'   rV     rW   c                 S   s   | j S rz   )ÚdayrT   r&   r&   r'   rV     rW   c                 S   s   g | ]}|  d ¡‘qS )Úi8)Úastype)Ú.0Zlevr&   r&   r'   Ú
<listcomp>  rW   zCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>)rš   rI   r›   T)Zinplace)ÚtmZmakeTimeDataFrameÚgroupbyÚsumrO   Z
set_levelsÚlevelsZ	set_names)ZtdfZymdr&   r&   r'   Ú/multiindex_year_month_day_dataframe_random_data  s
    
 r¤   c                   C   s*   t g d¢g d¢gg d¢g d¢gddgd�S )z;
    2-level MultiIndex, lexsorted, with string names.
    ©ÚfooÚbarÚbazÚqux©ÚoneÚtwoÚthree)
r   r   r   rG   rG   é   r®   é   r¯   r¯   )
r   rG   r®   r   rG   rG   r®   r   rG   r®   rb   Úsecond)r£   ÚcodesÚnames)r   r&   r&   r&   r'   Ú%lexsorted_two_level_string_multiindex  s
    ýr³   c                 C   s(   | }t tj dd¡|tg d¢dd�d�S )z2DataFrame with 2 level MultiIndex with random dataé
   r¯   )ÚAÚBÚCÚexp©r,   )rO   rP   )r   rK   ÚrandomÚrandnr   )r³   rO   r&   r&   r'   Ú multiindex_dataframe_random_data)  s    ÿr¼   c                  C   sT   t g d¢ƒ} t ddgƒ}t g d¢¡}t g d¢¡}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   rG   r®   r¯   r¯   )r   rG   r   rG   r   rG   rb   r°   F)r£   r±   r²   Zverify_integrity)r   rK   r„   r   )Z
major_axisZ
minor_axisZmajor_codesZminor_codesZindex_namesr&   r&   r'   Ú_create_multiindex4  s    ür½   c                   C   s,   t jddgddgtjdddd�gg d	¢d
�S )zB
    MultiIndex with a level that is a tzaware DatetimeIndex.
    rG   r®   ÚaÚbÚ20130101r¯   ú
US/Eastern)ZperiodsÚtzrª   )r²   )r   Zfrom_productrL   Z
date_ranger&   r&   r&   r'   Ú_create_mi_with_dt64tz_levelH  s    þrÃ   r™   z
US/Pacific)rÂ   Ú	complex64Ú
complex128Úint64©ÚdtypeÚint32Zint16Zint8Zuint64Zuint32Zuint16Zuint8Zfloat64Úfloat32r´   )r¦   r§   r¨   )rG   r®   r¯   )r   r   rG   rG   r®   r®   ZInt64ZUInt16ZFloat32Úbooleanzstring[python])#Ústringr   zdatetime-tzÚperiodr   ÚintÚuintÚrangeÚfloatrÄ   rÅ   Z	num_int64Z	num_int32Z	num_int16Znum_int8Z
num_uint64Z
num_uint32Z
num_uint16Z	num_uint8Znum_float64Znum_float32zbool-objectú
bool-dtypeZ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[   Úcopyr\   r&   r&   r'   rO   }  s    c                 C   s   g | ]}t t| tƒs|‘qS r&   )Ú
isinstancerÙ   r   ©rž   r’   r&   r&   r'   rŸ   ‘  s   rŸ   c                 C   s   | j }t|  ¡ S )z8
    index fixture, but excluding MultiIndex cases.
    )r[   rÙ   rÚ   )r]   r’   r&   r&   r'   Ú
index_flat�  s    	rÝ   c                 C   s0   g | ](}|d v s|  d¡stt| tƒs|‘qS ))rÎ   rÏ   rÐ   rÔ   rØ   rÒ   Znum_)Ú
startswithrÛ   rÙ   r   rÜ   r&   r&   r'   rŸ   ¢  s
   
úc                 C   s„   t | j jdd�}|j}| jdv 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×   rz   r   rG   Néÿÿÿÿ)rÙ   r[   rÚ   ÚvaluesÚtolistr   Úfrom_tuplesr|   )r]   ÚindÚvalsr&   r&   r'   Úindex_with_missing¡  s    

rç   c                  C   s   t  ¡ } d| _| S )zC
    Fixture for Series of floats with Index of unique strings
    r‚   )r    ZmakeStringSeriesr,   ©Ú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makeObjectSeriesr,   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makeTimeSeriesr,   rè   r&   r&   r'   Údatetime_seriesÝ  s    rî   c                 C   s"   t | ƒ}tj |¡}t|| dd�S )zHelper for the _series dictr¾   )rO   r,   )ÚlenrK   rº   r»   r   )rO   Ú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_idrO   r&   r&   r'   Ú
<dictcomp>î  s   ÿrô   c                 C   s   t | ƒS )zE
    Fixture for tests on series with changing types of indices.
    ró   ©rO   r&   r&   r'   Úseries_with_simple_indexô  s    rö   c                  C   sH   g d¢g d¢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¦   )r«   r¬   r«   r¬   r«   r¬   r«   r¬   é   rõ   r¯   )rn   r   rä   rK   rº   r»   r   ÚNaN)ZarraysrÕ   rO   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¾   )r,   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Ú   r\   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_frame\  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Ç   rG   rÉ   )r¾   r¿   ÚcrÊ   rÉ   rõ   )r   rK   r„   Úaranger&   r&   r&   r'   Úmixed_type_framey  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Ð  rG   r®   r¯   é   rF   rõ   )r   r   rK   rº   r»   rï   )Údatesr&   r&   r'   Ú(rand_series_with_duplicate_datetimeindex‹  s    









ör  )rg   rh   rh   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 rz   rZ   r\   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.
    rZ   r\   r&   r&   r'   Úall_arithmetic_operatorsÉ  s    r  c                 C   s   | j S )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    rZ   r\   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.
    rZ   r\   r&   r&   r'   Úall_arithmetic_functionsö  s    r  )
r¢   ÚmaxÚminÚmeanÚprodZstdÚvarZmedianZkurtZskewc                 C   s   | j S )z.
    Fixture for numeric reduction names.
    rZ   r\   r&   r&   r'   Úall_numeric_reductions"  s    r"  ÚallÚanyc                 C   s   | j S )z.
    Fixture for boolean reduction names.
    rZ   r\   r&   r&   r'   Úall_boolean_reductions-  s    r%  c                 C   s   | j S )z>
    Fixture for all (boolean + numeric) reduction names.
    rZ   r\   r&   r&   r'   Úall_reductions8  s    r&  c                 C   s   | j S )z;
    Fixture for operator module comparison functions.
    rZ   r\   r&   r&   r'   Úcomparison_op@  s    r'  )Ú__le__Ú__lt__Ú__ge__Ú__gt__c                 C   s   | j S )zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    rZ   r\   r&   r&   r'   Úcompare_operators_no_eq_neQ  s    
r,  )Ú__and__Ú__rand__Ú__or__Ú__ror__Ú__xor__Ú__rxor__c                 C   s   | j S )zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    rZ   r\   r&   r&   r'   Úall_logical_operators^  s    r3  c                 C   s
   |   d¡S )zO
    Returns the configuration for the test setting `--strict-data-files`.
    r$   )r8   )Zpytestconfigr&   r&   r'   Ústrict_data_fileso  s    r4  .)r4  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.
    Ztestsc                     sL   t jjˆ g| ¢R Ž }t j |¡sHˆr6td|› d�ƒ‚nt d|› d�¡ |S )NzCould not find file z  and --strict-data-files is set.zCould not find Ú.)Úosr*   ÚjoinÚexistsÚ
ValueErrorr/   r;   )rŠ   r*   ©Z	BASE_PATHr4  r&   r'   ÚdecoŒ  s    
ÿzdatapath.<locals>.deco)r6  r*   r7  ÚdirnameÚ__file__)r4  r;  r&   r:  r'   Údatapathw  s    r>  c                 C   s   t  | ddddƒ¡S )z*
    The iris dataset as a DataFrame.
    Úiorñ   Úcsvziris.csv)rL   Zread_csv)r>  r&   r&   r'   Úirisš  s    rA  z
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporez+01:15z-02:15z	UTC+01:15z	UTC-02:15i,  iÔþÿÿ)Úhoursrá   r¦   r¹   c                 C   s   g | ]}t |ƒ‘qS r&   rR   )rž   Úir&   r&   r'   rŸ   »  rW   c                 C   s   | j S )zD
    Fixture for trying timezones including default (None): {0}
    rZ   r\   r&   r&   r'   Útz_naive_fixture¾  s    rD  c                 C   s   | j S )z4
    Fixture for trying explicit timezones: {0}
    rZ   r\   r&   r&   r'   Útz_aware_fixtureÇ  s    rE  r   zdateutil/UTCc                 C   s   | j S )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    rZ   r\   r&   r&   r'   Úutc_fixtureÙ  s    rF  c                 C   s   | j S )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    rZ   r\   r&   r&   r'   Ústring_dtypeç  s    	rG  Úpyarrowz1.0.0)Úmin_versionc                 C   s   | j S )za
    Parametrized fixture for string dtypes.

    * 'string[python]'
    * 'string[pyarrow]'
    rZ   r\   r&   r&   r'   Únullable_string_dtypeó  s    rJ  Úpythonc                 C   s   | j S )zb
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    rZ   r\   r&   r&   r'   Ústring_storage  s    rL  c                 C   s   | j S )zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    rZ   r\   r&   r&   r'   Úbytes_dtype  s    rM  c                 C   s   | j S )zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    rZ   r\   r&   r&   r'   Úobject_dtype$  s    rN  Úobjectc                 C   s   | j S )zo
    Parametrized fixture for string dtypes.
    * 'object'
    * 'string[python]'
    * 'string[pyarrow]'
    rZ   r\   r&   r&   r'   Úany_string_dtype/  s    rP  c                 C   s   | j S )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    rZ   r\   r&   r&   r'   Údatetime64_dtypeB  s    rQ  c                 C   s   | j S )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    rZ   r\   r&   r&   r'   Útimedelta64_dtypeM  s    rR  c                	   C   s   t dddddddd�S )z-
    Fixture emits fixed Timestamp.now()
    iå  rG   rH   r  é   é   )rš   rI   r›   ÚhourÚminuter°   Úmicrosecond)r   r&   r&   r&   r'   Úfixed_now_tsX  s    ÿrX  c                 C   s   | j S )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    rZ   r\   r&   r&   r'   Úfloat_numpy_dtypeb  s    	rY  c                 C   s   | j S )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    rZ   r\   r&   r&   r'   Úfloat_ea_dtypen  s    rZ  c                 C   s   | j S )z~
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    rZ   r\   r&   r&   r'   Úany_float_dtypey  s    r[  c                 C   s   | j S )zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    rZ   r\   r&   r&   r'   Úcomplex_dtype‡  s    	r\  c                 C   s   | j S )z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    rZ   r\   r&   r&   r'   Úany_signed_int_numpy_dtype“  s    r]  c                 C   s   | j S )zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    rZ   r\   r&   r&   r'   Úany_unsigned_int_numpy_dtype¡  s    
r^  c                 C   s   | j S )z³
    Parameterized fixture for any integer dtype.

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

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    rZ   r\   r&   r&   r'   Úany_int_ea_dtypeÀ  s    r`  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'
    rZ   r\   r&   r&   r'   Úany_int_dtypeÑ  s    ra  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'
    rZ   r\   r&   r&   r'   Úany_numeric_ea_dtypeë  s    rb  c                 C   s   | j S )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    rZ   r\   r&   r&   r'   Úany_signed_int_ea_dtypeÿ  s    
rc  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'
    rZ   r\   r&   r&   r'   Úany_real_numpy_dtype  s    rd  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'
    rZ   r\   r&   r&   r'   Úany_numpy_dtype!  s    "re  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'
    rZ   r\   r&   r&   r'   Úany_numeric_dtypeF  s    $rf  rÌ   r¾   r  ÚmixedÚbytesó   aó   crÔ   zmixed-integerr®   g       @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
    --------
    >>> import pandas._libs.lib as 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[   rK   r„   rO  )r]   Zinferred_dtyperâ   r&   r&   r'   Úany_skipna_inferred_dtypeŒ  s    )
rn  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:)r=   )r/   ÚimportorskipZIPython.core.interactiveshellro  Ztraitlets.configrp  ZHistoryManagerZ	hist_file)ro  rp  r  r&   r&   r'   Úip¿  s    rr  )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scipyrs  Úgetattrr[   )r]   rs  r&   r&   r'   ÚspmatrixÒ  s    ru  c                 C   s6   g | ].}t ttj|ƒtjjƒr|d krttj|ƒ‘qS )ÚTick)Ú
issubclassrt  rL   Úoffsetsrv  )rž   Úor&   r&   r'   rŸ   Ý  s   þc                 C   s   | j S )zN
    Fixture for Tick based datetime offsets available for a time series.
    rZ   r\   r&   r&   r'   Útick_classesÜ  s    rz  c                 C   s   | S rz   r&   rT   r&   r&   r'   rV   ê  rW   c                 C   s   | j S )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    rZ   r\   r&   r&   r'   Úsort_by_keyê  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   c                    s(   |  dd ¡| jd< tƒ jf i |¤Ž d S )NÚtestr   )Úpopr�  Úsuperrˆ   )r‰   r‹   ©Ú	__class__r&   r'   rˆ   þ  s    z)fsspectest.<locals>.TestMemoryFS.__init__)r}   rŒ   r�   Úprotocolr�  rˆ   Ú__classcell__r&   r&   r„  r'   ÚTestMemoryFSú  s   rˆ  r€  T)Úclobber)r/   rq  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Ž  c                 C   s   | j S )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    rZ   r\   r&   r&   r'   r²   	  s    r²   c                 C   s   | j S )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    rZ   r\   r&   r&   r'   Úindexer_sli  s    r�  c                 C   s   | j S )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    rZ   r\   r&   r&   r'   Ú
indexer_li$  s    r�  c                 C   s   | j S )z8
    Parametrize over __setitem__, iloc.__setitem__
    rZ   r\   r&   r&   r'   Ú
indexer_si,  s    r‘  c                 C   s   | j S )z7
    Parametrize over __setitem__, loc.__setitem__
    rZ   r\   r&   r&   r'   Ú
indexer_sl4  s    r’  c                 C   s   | j S )z:
    Parametrize over at.__setitem__, loc.__setitem__
    rZ   r\   r&   r&   r'   Ú
indexer_al<  s    r“  c                 C   s   | j S )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    rZ   r\   r&   r&   r'   Úindexer_ialD  s    r”  c                   C   s   t jjjdkS )z>
    Fixture to check if the array manager is being used.
    r„   )rL   ÚoptionsÚmodeÚdata_managerr&   r&   r&   r'   Úusing_array_managerL  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)rL   r•  r–  Zcopy_on_writer—  r&   r&   r&   r'   Úusing_copy_on_writeT  s    rš  (   Ú__doc__Úcollectionsr   r   r   r   r   r   rl  r   Úoperatorr6  Útypingr	   Zdateutil.tzr
   r   Z
hypothesisr   ÚstÚnumpyrK   r/   Zpytzr   r   Zpandas.util._test_decoratorsÚutilZ_test_decoratorsÚtdZpandas.core.dtypes.dtypesr   r   ZpandasrL   r   r   r   r   r   r   Zpandas._testingZ_testingr    Zpandas.corer   Zpandas.core.indexes.apir   r   rH  ÚpaÚImportErrorZhas_pyarrowÚzoneinfoÚcompatZPY39ZZoneInfoZZoneInfoNotFoundErrorr0   r1   r9   r(   ZItemÚstrr2   r?   ÚsettingsZregister_profileZHealthCheckZtoo_slowZload_profileÚsplitr,   rt  Ztseriesrx  ÚclsZregister_type_strategyZbuildsZintegersZbooleansZfixturer7   rN   r^   Z
axis_framer_   r`   ra   rd   ri   rj   rk   r[   Z
skip_if_norq   rr   rs   rv   ry   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makeIntIndexZmakeUIntIndexZmakeRangeIndexZmakeFloatIndexr�   ZmakeNumericIndexZmakeBoolIndexrO  rº   r»   ZmakeCategoricalIndexZmakeIntervalIndexrä   rn   r  ÚboolrÙ   ÚidxÚkeysrO   Zindex_fixture2rÝ   Zindex_flat2rç   rê   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&  r'  r,  r3  r4  r>  rA  Z	TIMEZONESÚextendZTIMEZONE_IDSZparametrize_fixture_docrD  rE  Ztz_aware_fixture2Z_UTCSÚappendrF  Zutc_fixture2ZSTRING_DTYPESrG  rJ  rL  Zstring_storage2ZBYTES_DTYPESrM  ZOBJECT_DTYPESrN  rP  ZDATETIME64_DTYPESrQ  ZTIMEDELTA64_DTYPESrR  rX  ZFLOAT_NUMPY_DTYPESrY  ZFLOAT_EA_DTYPESrZ  r[  ZCOMPLEX_DTYPESr\  ZSIGNED_INT_NUMPY_DTYPESr]  ZUNSIGNED_INT_NUMPY_DTYPESr^  ZALL_INT_NUMPY_DTYPESr_  ZALL_INT_EA_DTYPESr`  ra  rb  ZSIGNED_INT_EA_DTYPESrc  ZALL_REAL_NUMPY_DTYPESrd  ZALL_NUMPY_DTYPESre  rf  ZNArm  Z_any_skipna_inferred_dtyperY   Ú_rn  rr  ru  Ú__all__rz  r{  r�  r²   ÚsetitemÚlocZilocr�  r�  r‘  r’  Úatr“  Ziatr”  r˜  rš  r&   r&   r&   r'   Ú<module>   sò   


ÿ
<öÿ
üþ

üþ









ùÿ
úÿ









ÿ





þ

Ý%
ÿÿ
	þÿ
			þþ

þ÷ÿ


æÿ
òÿ






úÿ


ÿ

"î


ÿþÿ
þÿ

ÿýÿ	


	
$ÿþýÿ#$$ç2	þÿøÿ