a
    ï½„gñ½  ã                $   @  sT  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 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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.m/Z/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z6 ddl7m8Z8 ddl9m:Z:m;Z; ddl<m=Z= e�r`ddl>m?Z?m@Z@ zddlAZBW n eC�y„   dZDY n0 [BdZDddlEZEzeE Fd¡ W n eEjG�y¼   dZEY n0 ddœdd„ZHdddddœdd„ZIddœdd„ZJejKjLgZMe=ejNƒe=d ƒk�reM OejKjP¡ ejQjRd!deSeMƒd"� ejQ Td!¡ d# U¡ D ]8ZVeWe'jXjYeVƒZZe [eZej\eZe ]d$d%¡e ^¡ d&�¡ �qDd' U¡ D ]DZVeWe'jXjYeVƒZZe [eZej\eZe ]d(d)¡e ^¡ ej]d*d+d,�d-�¡ �q†d. U¡ D ]DZVeWe'jXjYeVƒZZe [eZej\eZe ]d/d0¡e ^¡ ej]d*d+d,�d1�¡ �qÔej_dd2�ddœd3d4„ƒZ`ej_dd2�ddœd5d6„ƒZaej_g d7¢d8d9„ d:�d;d<„ ƒZbebZcej_d*d=gd>d9„ d:�d?d@„ ƒZdej_g dA¢dB�dCdD„ ƒZeej_g dA¢dB�dEdF„ ƒZfej_ddgdB�dGdH„ ƒZgej_g dI¢dB�dJdK„ ƒZhej_g dL¢dB�dMdN„ ƒZiej_g dO¢dB�dPdQ„ ƒZjej_g dO¢dB�dRdS„ ƒZkej_ddTdUdVdWdXejldYe" mdZ¡d[�gdB�d\d]„ ƒZnej_dTdUdVdWdXejldYe" mdZ¡d[�gdB�d^d_„ ƒZoej_ddgdB�d`da„ ƒZpej_g db¢dB�dcdd„ ƒZqej_dedfgdB�dgdh„ ƒZrej_e6jsdid9„ d:�djdk„ ƒZtetZuej_dejve'jwgdB�dldm„ ƒZxexZyej_e6jzdnd9„ d:�dodp„ ƒZ{e{Z|ej_e)e.gdB�dqdr„ ƒZ}ej_e:e.gdsdtgd:�dudv„ ƒZ~e~Zej_e:e.e'j€gg dw¢d:�dxdy„ ƒZ�ej_e:e.e)e'j€gdzd9„ d:�d{d|„ ƒZ‚e‚Zƒej_d}dœd~d„ƒZ„ej_d€dœd�d‚„ƒZ…ej_dƒd„„ ƒZ†ej_d…dœd†d‡„ƒZ‡ej_dˆdœd‰dŠ„ƒZˆd‹dŒ„ Z‰d�dŽ„ ZŠe:d�d�„ e‹d‘ƒD ƒƒe1d’d‘d“�e1d’d‘d”d•�e2d’d‘d–d—�e3d˜d‘d–d™�e-d‘ƒe:e Œd‘¡dšd›�e:e Œd‘¡dœd›�e:e Œd‘¡d�d›�e:e Œd‘¡džd›�e:e Œd‘¡dŸd›�e:e Œd‘¡d d›�e:e Œd‘¡d¡d›�e:e Œd‘¡d¢d›�e:e Œd‘¡d£d›�e:e Œd‘¡d¤d›�e:ddgd) e�d›�e:ddgd) eŽd›�e:ejŒd‘d¥d›�d¦ejŒd‘d¥d›�  ƒe:ejŒd‘d§d›�d¦ejŒd‘d§d›�  ƒe(e�d¨ƒd© ƒe+ �ej‘dd‘dªd«�¡e:g ƒe; ’e“g d¬¢g d­¢ƒ¡eŠƒ e‰ƒ 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'j€d³d�„ e‹d‘ƒD ƒd´d›�ƒdµœ Z•eD�rle:e'j€d¶d�„ e‹d‘ƒD ƒd·d›�ƒZ–e–e•d¸< ej_e• —¡ dB�d¹ds„ ƒZ˜e˜Z™ej_dºd�„ e• š¡ D ƒdB�d»d¼„ ƒZ›e›Zœej_d½d�„ e• š¡ D ƒdB�d¾d¿„ ƒZ�ej_dÀdœdÁdÂ„ƒZžej_dÀdœdÃdÄ„ƒZŸej_dÀdœdÅdÆ„ƒZ dÇdÈ„ Z¡dÉdÊ„ e• š¡ D ƒZ¢ej_dÀdœdËdÌ„ƒZ£dÍdÊ„ e6j¤D ƒZ¥i e•¥e¢¥e¥¥Z¦ej_e¦ —¡ dB�dÎdÏ„ ƒZ§dÐdÊ„ e6j¨D ƒZ©i e•¥e¢¥e¥¥e©¥Zªej_eª —¡ dB�dÑdÒ„ ƒZ«ej_dˆdœdÓdÔ„ƒZ¬ej_dˆdœdÕdÖ„ƒZ­ej_dÀdœd×dØ„ƒZ®ej_e*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e0dãdädå�e$dædädç�fe/dèdé�dêfgdB�dëdì„ ƒZ¯ej_e6j°dB�dídî„ ƒZ±ej_ej²e8j³ej´e8jµej¶e8j·ej¸e8j¹ejºe8j»ej¼e8j½ej¾e8j¿ejÀejÁejÂejÃejÄejÅejÆe8jÇejÈe8jÉejÊe8jËgdB�dïdð„ ƒZÌej_ej²e8j³ej´e8jµej¶e8j·ej¸e8j¹ejºe8j»ej¼e8j½ej¾e8j¿gdB�dñdò„ ƒZÍg dó¢ZÎej_eÎdB�dôdõ„ ƒZÏdöd÷gZÐej_eÐdB�dødù„ ƒZÑeÎeÐ ZÒej_eÒdB�dúdû„ ƒZÓej_ejÀejÁejÄejÅejÂejÃgdB�düdý„ ƒZÔej_g dþ¢dB�dÿ�d „ ƒZÕej_g �d¢dB��d�d„ ƒZÖg �d¢Z×ej_e×dB��d�d„ ƒZØej_�d�d„ ƒZÙej_d�d	�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ÛeEdu�rÞeÛ ÜeE Fd”¡eE Fd¡g¡ �dd�„ eÛD ƒZÝe" ÞeßeÝƒ¡ej_eÛeÝd:��d�d„ ƒƒZàe" ÞeßeÝd*d… ƒ¡ej_eÛd*d… eÝd*d… d:��d�d„ ƒƒZáeáZâ�d�d eeƒ e	jgZãeEdu�rŠeã OeE Fd¡¡ ej_eãdB��d!�d"„ ƒZäeäZåej_g �d#¢dB��d$�d%„ ƒZæeæZçej_e6jèdB��d&�d'„ ƒZéej_d´ejld·e" m�d(¡d[�gdB��d)�d*„ ƒZêej_�d+ejl�d(e" m�d(¡d[�ejl�d,e" m�d(¡d[�gdB��d-�d.„ ƒZëej_�d/ejl�d(e" m�d(¡d[�gdB��d0�d1„ ƒZìeëZíej_e6jîdB��d2�d3„ ƒZïej_e6jðdB��d4�d5„ ƒZñej_�d6d´ejld·e" m�d(¡d[�ejl�d7e" m�d(¡d[�gdB��d8�d9„ ƒZòej_e6jódB��d:�d;„ ƒZôej_e6jõdB��d<�d=„ ƒZöej_�d>dœ�d?�d@„ƒZ÷ej_e6jødB��dA�dB„ ƒZùej_e6júdB��dC�dD„ ƒZûej_e6jüdB��dE�dF„ ƒZýej_e6jþdB��dG�dH„ ƒZÿej_e6�j dB��dI�dJ„ ƒ�Zej_e6�jdB��dK�dL„ ƒ�Zej_e6�jdB��dM�dN„ ƒ�Zej_e6�jdB��dO�dP„ ƒ�Zej_e6�jdB��dQ�dR„ ƒ�Z	ej_e6�j
dB��dS�dT„ ƒ�Zej_e6�je6jú dB��dU�dV„ ƒ�Zej_e6�je6jú e6�j e6�j dB��dW�dX„ ƒ�Zej_e6�jdB��dY�dZ„ ƒ�Zej_e6�jdB��d[�d\„ ƒ�Zej_e6�jdB��d]�d^„ ƒ�Zej_e6�jdB��d_�d`„ ƒ�Zej_e6�jdB��da�db„ ƒ�Zej_e6�jdB��dc�dd„ ƒ�Z�de�dfejv�dggf�de�dfe'�j�dggf�dh�dfe'jw�dggf�di�djejv�dkgf�dlejvejvejvgf�dlg f�dm�dfejv�dngf�dh�dfejv�dogf�dp�dqejv�dogf�drd*ejv�dngf�dsd*ejv�dogf�dted*ƒejve�dnƒgfd²dejvdgfd²de'�jdgf�due� �dv¡ejve� �dw¡gf�dxe0�dyƒejve0�dzƒgf�d{e�d|d*d*ƒejve�d}d*d*ƒgf�d~�dejv�d€gf�d�ed*ƒejve�dnƒgf�d‚ed*ƒejve�dnƒgf�dƒe,�d|ƒe'jwe,�d}ƒgf�d„e*dd*ƒejve*d�dnƒgfg�Ze“�eŽ \�Z�Z ej_�e�ed:��d…�d†„ ƒ�Z!ej_�d‡�dˆ„ ƒ�Z"ej_g �d‰¢dB��dŠ�d‹„ ƒ�Z#ej_�dŒd�„ e'jY�j$D ƒdB��d��dŽ„ ƒ�Z%ej_d�d�d9„ gdB��d��d‘„ ƒ�Z&ej_�d’�d“�d”ejvejvejvfejve'jwdfejve'�jdfe'�je'�je'�jfgdB��d•dœ�d–�d—„ƒ�Z'ej_e6�j(e6�j)e6�j*gdB��d˜�d™„ ƒ�Z+ej_e6�j)e6�j*gdB��dš�d›„ ƒ�Z,ej_e6�j(e6�j*gdB��dœ�d�„ ƒ�Z-ej_e6�j(e6�j)gdB��dž�dŸ„ ƒ�Z.ej_e6�j/e6�j)gdB��d �d¡„ ƒ�Z0ej_e6�j1e6�j*gdB��d¢�d£„ ƒ�Z2ej_�d¤dœ�d¥�d¦„ƒ�Z3ej_�d¤dœ�d§�d¨„ƒ�Z4ej_�d¤dœ�d©�dª„ƒ�Z5ej_�d¤dœ�d«�d¬„ƒ�Z6�d­�d®g�Z7eEdu�r�e7 OeE F�d­¡¡ ej_�e7dB�ddœ�d¯�d°„ƒ�Z8e _¡ �d±�d²„ ƒ�Z9d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)ÚTYPE_CHECKINGÚCallable)ÚtzlocalÚtzutc)Ú
strategies)ÚFixedOffsetÚutc©Ú_get_option)ÚDatetimeTZDtypeÚIntervalDtype)ÚCategoricalIndexÚ	DataFrameÚIntervalÚIntervalIndexÚPeriodÚ
RangeIndexÚSeriesÚ	TimedeltaÚ	TimestampÚ
date_rangeÚperiod_rangeÚtimedelta_range)Úops)ÚIndexÚ
MultiIndex)ÚVersion)ÚHashableÚIteratorFTÚUTCÚNone©Úreturnc                 C  s   | j dddd� d S )Nú--no-strict-data-filesÚstore_falsez6Don't fail if a test is skipped for missing data file.)ÚactionÚhelp)Z	addoption)Úparser© r0   úR/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pandas/conftest.pyÚpytest_addoptiono   s
    ýr2   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ÚendswithZ
add_markerÚpytestÚmarkÚfilterwarnings)r4   r5   r6   r0   r0   r1   Úignore_doctest_warningw   s    r<   c                 C  sL   |  d¡p|j ddd�}g d¢}|rH| D ]}|D ]\}}t|||ƒ q0q(d S )Nz--doctest-modulesz--doctest-cythonF)Údefault))Zis_int64_dtypezis_int64_dtype is deprecated)Zis_interval_dtypezis_interval_dtype is deprecated)Zis_period_dtypezis_period_dtype is deprecated)Zis_datetime64tz_dtypez#is_datetime64tz_dtype is deprecated)Zis_categorical_dtypez"is_categorical_dtype is deprecated)Z	is_sparsezis_sparse is deprecated)úDataFrameGroupBy.fillnaz%DataFrameGroupBy.fillna is deprecated)úNDFrame.replacezThe 'method' keyword)r?   zSeries.replace without 'value')zNDFrame.clipz4Downcasting behavior in Series and DataFrame methods)zSeries.idxminúThe behavior of Series.idxmin)zSeries.idxmaxúThe behavior of Series.idxmax)zSeriesGroupBy.fillnaz"SeriesGroupBy.fillna is deprecated)zSeriesGroupBy.idxminr@   )zSeriesGroupBy.idxmaxrA   )zmissing.mask_zero_div_zerozdivide by zero encountered)Zto_pydatetimez>The behavior of DatetimeProperties.to_pydatetime is deprecated)z pandas.core.generic.NDFrame.boolzY(Series|DataFrame).bool is now deprecated and will be removed in future version of pandas)z!pandas.core.generic.NDFrame.firstzqfirst is deprecated and will be removed in a future version. Please create a mask and filter using `.loc` instead)zResampler.fillnaz+DatetimeIndexResampler.fillna is deprecated)r>   z3DataFrameGroupBy.fillna with 'method' is deprecated)r>   z,DataFrame.fillna with 'method' is deprecated)Zread_parquetz1Passing a BlockManager to DataFrame is deprecated)Ú	getoptionr<   )ÚitemsÚconfigZ
is_doctestZignored_doctest_warningsr4   r5   r6   r0   r0   r1   Úpytest_collection_modifyitems‰   s    ÿ/rE   z6.83.2Úci)ÚdeadlineZsuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndi�ÿÿÿéc   )ÚnÚ	normalizez%YearBegin YearEnd BYearBegin BYearEndéûÿÿÿé   é   é   )Z	min_valueZ	max_value)rI   rJ   Úmonthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndièÿÿÿé   )rI   rJ   ZstartingMonth)Zautousec                 C  s   t | d< t| d< dS )z:
    Make `np` and `pd` names available for doctests.
    ÚnpÚpdN)rQ   rR   )Zdoctest_namespacer0   r0   r1   Úadd_doctest_imports   s    rS   c                   C  s   t  dd¡ dS )z<
    Configure settings for all tests and test modules.
    Zchained_assignmentÚraiseN)rR   Z
set_optionr0   r0   r0   r1   Úconfigure_tests	  s    rU   )r   rM   ÚindexÚcolumnsc                 C  s   dt | ƒ› �S ©Nzaxis=©Úrepr©Úxr0   r0   r1   Ú<lambda>  ó    r]   )ÚparamsÚidsc                 C  s   | j S )z@
    Fixture for returning the axis numbers of a DataFrame.
    ©Úparam©Úrequestr0   r0   r1   Úaxis  s    re   rW   c                 C  s   dt | ƒ› �S rX   rY   r[   r0   r0   r1   r]     r^   c                 C  s   | j S )zA
    Fixture for returning aliases of axis 1 of a DataFrame.
    ra   rc   r0   r0   r1   Úaxis_1  s    rf   )TFN)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).
    ra   rc   r0   r0   r1   Úobserved'  s    
rg   c                 C  s   | j S )z6
    Boolean 'ordered' parameter for Categorical.
    ra   rc   r0   r0   r1   Úordered4  s    rh   c                 C  s   | j S )z%
    Boolean 'skipna' parameter.
    ra   rc   r0   r0   r1   Úskipna<  s    ri   )ÚfirstÚlastFc                 C  s   | j S )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    ra   rc   r0   r0   r1   ÚkeepD  s    rl   )ÚbothÚneitherÚleftÚrightc                 C  s   | j S )zA
    Fixture for trying all interval 'inclusive' parameters.
    ra   rc   r0   r0   r1   Úinclusive_endpoints_fixtureM  s    rq   )ro   rp   rm   rn   c                 C  s   | j S )z<
    Fixture for trying all interval closed parameters.
    ra   rc   r0   r0   r1   ÚclosedU  s    rr   c                 C  s   | j S )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    ra   rc   r0   r0   r1   Úother_closed]  s    rs   ÚgzipÚbz2ÚzipÚxzÚtarZzstdZ	zstandard)Zmarksc                 C  s   | j S )zK
    Fixture for trying common compression types in compression tests.
    ra   rc   r0   r0   r1   Úcompressione  s    ry   c                 C  s   | j S )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    ra   rc   r0   r0   r1   Úcompression_onlyw  s    rz   c                 C  s   | j S )z,
    Fixture that an array is writable.
    ra   rc   r0   r0   r1   Úwritable‰  s    r{   )ÚinnerÚouterro   rp   c                 C  s   | j S )z:
    Fixture for trying all types of join operations.
    ra   rc   r0   r0   r1   Ú	join_type‘  s    r~   ÚnlargestÚ	nsmallestc                 C  s   | j S )z1
    Fixture for trying all nselect methods.
    ra   rc   r0   r0   r1   Únselect_method™  s    r�   c                 C  s
   t | ƒjS ©N©ÚtypeÚ__name__r[   r0   r0   r1   r]   ¤  r^   c                 C  s   | j S )z/
    Fixture for each null type in pandas.
    ra   rc   r0   r0   r1   Únulls_fixture¤  s    r†   c                 C  s   | j S )zL
    Fixture for each null type in pandas, each null type exactly once.
    ra   rc   r0   r0   r1   Úunique_nulls_fixture¯  s    r‡   c                 C  s
   t | ƒjS r‚   rƒ   r[   r0   r0   r1   r]   »  r^   c                 C  s   | j S )z-
    Fixture for each NaT type in numpy.
    ra   rc   r0   r0   r1   Únp_nat_fixture»  s    rˆ   c                 C  s   | j S )z;
    Fixture to parametrize over DataFrame and Series.
    ra   rc   r0   r0   r1   Úframe_or_seriesÌ  s    r‰   rV   Ú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
    ra   rc   r0   r0   r1   Úindex_or_seriesÔ  s    
r‹   )rV   rŠ   Úarrayc                 C  s   | j S )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    ra   rc   r0   r0   r1   Úindex_or_series_or_arrayå  s    r�   c                 C  s   | j S r‚   )r…   r[   r0   r0   r1   r]   í  r^   c                 C  s   | j S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    ra   rc   r0   r0   r1   Úbox_with_arrayí  s    rŽ   z
type[dict]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| g|¢R i |¤Ž d S r‚   )ÚdictÚ__init__)ÚselfÚargsÚkwargsr0   r0   r1   r�      s    z+dict_subclass.<locals>.TestSubDict.__init__N)r…   Ú
__module__Ú__qualname__r�   r0   r0   r0   r1   ÚTestSubDictÿ  s   r–   )r�   )r–   r0   r0   r1   Údict_subclassù  s    r—   ztype[abc.Mapping]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_dictr0   r0   r1   r�     s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__c                 S  s   | j  |¡S r‚   )r˜   Ú__getitem__)r‘   Úkeyr0   r0   r1   r™     s    zAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__r&   c                 S  s
   | j  ¡ S r‚   )r˜   Ú__iter__©r‘   r0   r0   r1   r›     s    z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Úintc                 S  s
   | j  ¡ S r‚   )r˜   Ú__len__rœ   r0   r0   r1   rž     s    z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__N)r…   r”   r•   r�   r™   r›   rž   r0   r0   r0   r1   ÚTestNonDictMapping  s   rŸ   )r   ÚMapping)rŸ   r0   r0   r1   Únon_dict_mapping_subclass  s    r¡   c                  C  s†   t tj d¡ d¡ttdƒtd�tdddd�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   é   ÚABCD©Údtypeú
2000-01-01r£   ÚB©ÚperiodsÚfreq)rW   rV   c                 S  s   | j S r‚   )Úyearr[   r0   r0   r1   r]   *  r^   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>c                 S  s   | j S r‚   )rO   r[   r0   r0   r1   r]   *  r^   c                 S  s   | j S r‚   )Údayr[   r0   r0   r1   r]   *  r^   c                 S  s   g | ]}|  d ¡‘qS )Úi8)Úastype)Ú.0Zlevr0   r0   r1   Ú
<listcomp>,  r^   zCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>)r­   rO   r®   T)Zinplace)r   rQ   ÚrandomÚdefault_rngÚstandard_normalr"   ÚlistÚobjectr   ÚgroupbyÚsumrV   Z
set_levelsÚlevelsZ	set_names)ZtdfZymdr0   r0   r1   Ú/multiindex_year_month_day_dataframe_random_data  s    ý r»   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ÚbazZqux©ÚoneÚtwoÚthree)
r   r   r   rM   rM   r¢   r¢   é   rÄ   rÄ   )
r   rM   r¢   r   rM   rM   r¢   r   rM   r¢   rj   Úsecond)rº   ÚcodesÚnames)r#   r0   r0   r0   r1   Ú%lexsorted_two_level_string_multiindex1  s
    ýrÈ   r   c                 C  s,   | }t tj d¡ d¡|tg d¢dd�d�S )z2DataFrame with 2 level MultiIndex with random datar¢   )é
   rÄ   )ÚAr©   ÚCÚexp©r7   ©rV   rW   )r   rQ   r³   r´   rµ   r"   )rÈ   rV   r0   r0   r1   Ú 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   rM   r¢   rÄ   rÄ   )r   rM   r   rM   r   rM   rj   rÅ   F)rº   rÆ   rÇ   Zverify_integrity)r"   rQ   rŒ   r#   )Z
major_axisZ
minor_axisZmajor_codesZminor_codesZindex_namesr0   r0   r1   Ú_create_multiindexJ  s    ürÐ   c                   C  s*   t jddgddgtdddd�gg d	¢d
�S )zB
    MultiIndex with a level that is a tzaware DatetimeIndex.
    rM   r¢   ÚaÚbÚ20130101rÄ   ú
US/Eastern©r«   ÚtzrÀ   )rÇ   )r#   Zfrom_productr   r0   r0   r0   r1   Ú_create_mi_with_dt64tz_level^  s    þr×   c                 C  s   g | ]}d |› �‘qS ©Zpandas_r0   ©r±   Úir0   r0   r1   r²   j  r^   r²   r£   z
2020-01-01)r«   z
US/PacificrÕ   ÚDrª   z1 day)Ústartr«   r¬   Úint8r¦   Úint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64Úfloat32Úfloat64Ú	complex64y              ð?Ú
complex128Úabcdé   ée   )Únum)r½   r¾   r¿   )rM   r¢   rÄ   )r   r   rM   rM   r¢   r¢   ZInt64ZUInt16ZFloat32Úbooleanc                 C  s   g | ]}d |› �‘qS rØ   r0   rÙ   r0   r0   r1   r²   Ž  r^   z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-pythonc                 C  s   g | ]}d |› �‘qS rØ   r0   rÙ   r0   r0   r1   r²   ’  r^   z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_dictrb   Úcopyrc   r0   r0   r1   rV   –  s    c                 C  s   g | ]\}}t |tƒs|‘qS r0   )Ú
isinstancer#   ©r±   rš   Úvaluer0   r0   r1   r²   ª  s   c                 C  s   | j }t|  ¡ S )z8
    index fixture, but excluding MultiIndex cases.
    )rb   rø   rù   )rd   rš   r0   r0   r1   Ú
index_flat©  s    	rý   c                 C  s0   g | ](\}}|  d ¡s|dv st|tƒs|‘qS ))r�   ZuintÚfloat)rð   ró   r÷   rñ   )Ú
startswithrú   r#   rû   r0   r0   r1   r²   »  s
   

úc                 C  sˆ   t | j jdd�}|j ¡ }| jdv rh| ¡ }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   rM   Néÿÿÿÿ)rø   rb   rù   ÚvaluesÚtolistr#   Úfrom_tuplesr„   )rd   ÚindÚvalsr0   r0   r1   Úindex_with_missingº  s    


r  r   c                   C  s4   t tjdtjd�d tdd„ tdƒD ƒtd�dd�S )zC
    Fixture for Series of floats with Index of unique strings
    é   r¦   gš™™™™™ñ?c                 S  s   g | ]}d |› �‘qS )Zi_r0   rÙ   r0   r0   r1   r²   é  r^   z!string_series.<locals>.<listcomp>rŠ   ©rV   r7   )r   rQ   Úarangeræ   r"   rð   r·   r0   r0   r0   r1   Ústring_seriesâ  s
    ýr  c                  C  s<   dd„ t dƒD ƒ} tdd„ t dƒD ƒtd�}t| |dtd�S )zI
    Fixture for Series of dtype object with Index of unique strings
    c                 S  s   g | ]}d |› �‘qS ©Zfoo_r0   rÙ   r0   r0   r1   r²   ó  r^   z!object_series.<locals>.<listcomp>r	  c                 S  s   g | ]}d |› �‘qS )Zbar_r0   rÙ   r0   r0   r1   r²   ô  r^   r¦   Úobjects©rV   r7   r§   )rð   r"   r·   r   )ÚdatarV   r0   r0   r1   Úobject_seriesî  s    r  c                   C  s&   t tj d¡ d¡tdddd�dd�S )z9
    Fixture for Series of floats with DatetimeIndex
    r¢   r	  r¨   r©   rª   Útsr
  )r   rQ   r³   r´   rµ   r   r0   r0   r0   r1   Údatetime_seriesø  s
    ýr  c                 C  s*   t | ƒ}tj d¡ |¡}t|| ddd�S )zHelper for the _series dictr¢   rÑ   F)rV   r7   rù   )ÚlenrQ   r³   r´   rµ   r   )rV   Úsizer  r0   r0   r1   Ú_create_series  s    r  c                 C  s"   i | ]\}}d |› d�t |ƒ“qS )zseries-with-z-index©r  )r±   Zindex_idrV   r0   r0   r1   Ú
<dictcomp>  s   ÿr  c                 C  s   t | ƒS )zE
    Fixture for tests on series with changing types of indices.
    r  ©rV   r0   r0   r1   Úseries_with_simple_index  s    r  c              	   C  s8   i | ]0}|j › d �ttdƒdd„ tdƒD ƒd|d�“qS )ú-seriesr	  c                 S  s   g | ]}d |› �‘qS )zi-r0   rÙ   r0   r0   r1   r²     r^   z<dictcomp>.<listcomp>rÑ   r  )r…   r   rð   ©r±   r§   r0   r0   r1   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_objsrb   rù   rc   r0   r0   r1   Úindex_or_series_obj$  s    r  c                 C  s   i | ]}|j › d �t|ƒ“qS )r  )r…   r   r  r0   r0   r1   r  -  s   c                 C  s   t | j jdd�S )z 
    Fixture for tests on indexes, series, series with a narrow dtype and
    series with empty objects type
    copy to avoid mutation, e.g. setting .name
    Tr   )Ú_index_or_series_memory_objsrb   rù   rc   r0   r0   r1   Úindex_or_series_memory_obj:  s    r   c                   C  s<   t tjdtjd�tdd„ tdƒD ƒtd�ttdƒtd�d�S )zj
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']
    ©r	  r¤   r¦   c                 S  s   g | ]}d |› �‘qS r  r0   rÙ   r0   r0   r1   r²   P  r^   zint_frame.<locals>.<listcomp>r	  r¥   rÎ   )r   rQ   Zonesrà   r"   rð   r·   r¶   r0   r0   r0   r1   Ú	int_frameG  s
    ýr"  c                   C  s6   t tj d¡ d¡tdd„ tdƒD ƒƒttdƒƒd�S )zm
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    r¢   r!  c                 S  s   g | ]}d |› �‘qS r  r0   rÙ   r0   r0   r1   r²   ^  r^   zfloat_frame.<locals>.<listcomp>r	  r¥   rÎ   )r   rQ   r³   r´   rµ   r"   rð   r¶   r0   r0   r0   r1   Úfloat_frameU  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 d¡ t| ƒ¡| d�S )zF
    Fixture for Series with a DatetimeIndex that has duplicates.
    iÐ  rM   r¢   rÄ   r¤   rL   r  )r   r   rQ   r³   r´   rµ   r  )Údatesr0   r0   r1   Ú(rand_series_with_duplicate_datetimeindexc  s    









ör%  )ro   rp   rp   gš™™™™™¹?g      à?z2012-01ÚM)r¬   z	period[M]z
2012-02-01z	period[D]z
2011-01-01rÔ   )rÖ   Ús)ÚunitrÖ   iô  )Úsecondsztimedelta64[ns]c                 C  s   | j S r‚   ra   rc   r0   r0   r1   Úea_scalar_and_dtype{  s    r*  c                 C  s   | j S )zD
    Fixture for dunder names for common arithmetic operations.
    ra   rc   r0   r0   r1   Úall_arithmetic_operators‘  s    r+  c                 C  s   | j S )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    ra   rc   r0   r0   r1   Ú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.
    ra   rc   r0   r0   r1   Úall_arithmetic_functions¾  s    r-  )Úcountr¹   ÚmaxÚminÚmeanÚprodZstdÚvarZmedianZkurtZskewZsemc                 C  s   | j S )z.
    Fixture for numeric reduction names.
    ra   rc   r0   r0   r1   Úall_numeric_reductionsì  s    r4  ÚallÚanyc                 C  s   | j S )z.
    Fixture for boolean reduction names.
    ra   rc   r0   r0   r1   Úall_boolean_reductions÷  s    r7  c                 C  s   | j S )z>
    Fixture for all (boolean + numeric) reduction names.
    ra   rc   r0   r0   r1   Úall_reductions  s    r8  c                 C  s   | j S )z;
    Fixture for operator module comparison functions.
    ra   rc   r0   r0   r1   Úcomparison_op
  s    r9  )Ú__le__Ú__lt__Ú__ge__Ú__gt__c                 C  s   | j S )zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    ra   rc   r0   r0   r1   Úcompare_operators_no_eq_ne  s    
r>  )Ú__and__Ú__rand__Ú__or__Ú__ror__Ú__xor__Ú__rxor__c                 C  s   | j S )zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    ra   rc   r0   r0   r1   Úall_logical_operators(  s    rE  )ZcumsumZcumprodZcumminZcummaxc                 C  s   | j S )z0
    Fixture for numeric accumulation names
    ra   rc   r0   r0   r1   Úall_numeric_accumulations9  s    rF  c                 C  s
   |   d¡S )zR
    Returns the configuration for the test setting `--no-strict-data-files`.
    r+   )rB   )Zpytestconfigr0   r0   r1   Ústrict_data_filesD  s    rG  zCallable[..., str])rG  r*   c                   s(   t j t j t¡d¡‰ ‡ ‡fdd„}|S )aD  
    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 --no-strict-data-files option is not set.
    Útestsc                    sJ   t jjˆ g| ¢R Ž }t j |¡sFˆr4td|› d�ƒ‚t d|› d�¡ |S )NzCould not find file z' and --no-strict-data-files is not set.zCould not find Ú.)Úosr5   ÚjoinÚexistsÚ
ValueErrorr9   Úskip)r’   r5   ©Z	BASE_PATHrG  r0   r1   Údecoa  s    
ÿzdatapath.<locals>.deco)rJ  r5   rK  ÚdirnameÚ__file__)rG  rP  r0   rO  r1   ÚdatapathL  s    
rS  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 r0   rY   rÙ   r0   r0   r1   r²   Œ  r^   c                 C  s   | j S )zD
    Fixture for trying timezones including default (None): {0}
    ra   rc   r0   r0   r1   Útz_naive_fixture�  s    rU  c                 C  s   | j S )z4
    Fixture for trying explicit timezones: {0}
    ra   rc   r0   r0   r1   Útz_aware_fixture˜  s    rV  r   zdateutil/UTCc                 C  s   | j S )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    ra   rc   r0   r0   r1   Úutc_fixtureª  s    rW  )r'  ÚmsÚusÚnsc                 C  s   | j S )z&
    datetime64 units we support.
    ra   rc   r0   r0   r1   r(  µ  s    r(  c                 C  s   | j S )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    ra   rc   r0   r0   r1   Ústring_dtypeÃ  s    	r[  Úpyarrowc                 C  s   | j S )za
    Parametrized fixture for string dtypes.

    * 'string[python]'
    * 'string[pyarrow]'
    ra   rc   r0   r0   r1   Únullable_string_dtypeÏ  s    r]  ÚpythonÚpyarrow_numpyc                 C  s   | j S )zx
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    * 'pyarrow_numpy'
    ra   rc   r0   r0   r1   Ústring_storageß  s    r`  Znumpy_nullablec                 C  s   | j S )zb
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    ra   rc   r0   r0   r1   Údtype_backendñ  s    ra  c                 C  s   | j S )zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    ra   rc   r0   r0   r1   Úbytes_dtype  s    rb  c                 C  s   | j S )zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    ra   rc   r0   r0   r1   Úobject_dtype  s    rc  r·   zstring[pyarrow_numpy]c                 C  s   | j S )zo
    Parametrized fixture for string dtypes.
    * 'object'
    * 'string[python]'
    * 'string[pyarrow]'
    ra   rc   r0   r0   r1   Úany_string_dtype  s    rd  c                 C  s   | j S )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    ra   rc   r0   r0   r1   Údatetime64_dtype-  s    re  c                 C  s   | j S )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    ra   rc   r0   r0   r1   Útimedelta64_dtype8  s    rf  r   c                	   C  s   t dddddddd�S )z-
    Fixture emits fixed Timestamp.now()
    iå  rM   rN   r¤   é   é   )r­   rO   r®   ÚhourÚminuterÅ   Úmicrosecond)r   r0   r0   r0   r1   Úfixed_now_tsC  s    ÿrl  c                 C  s   | j S )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    ra   rc   r0   r0   r1   Úfloat_numpy_dtypeM  s    	rm  c                 C  s   | j S )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    ra   rc   r0   r0   r1   Úfloat_ea_dtypeY  s    rn  c                 C  s   | j S )z~
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    ra   rc   r0   r0   r1   Úany_float_dtyped  s    ro  c                 C  s   | j S )zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    ra   rc   r0   r0   r1   Úcomplex_dtyper  s    	rp  c                 C  s   | j S )z£
    Parameterized fixture for complex and numpy float dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    * float
    * 'float32'
    * 'float64'
    ra   rc   r0   r0   r1   Úcomplex_or_float_dtype~  s    rq  c                 C  s   | j S )z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    ra   rc   r0   r0   r1   Úany_signed_int_numpy_dtype�  s    rr  c                 C  s   | j S )zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    ra   rc   r0   r0   r1   Úany_unsigned_int_numpy_dtype›  s    
rs  c                 C  s   | j S )z³
    Parameterized fixture for any integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    ra   rc   r0   r0   r1   Úany_int_numpy_dtype¨  s    rt  c                 C  s   | j S )z²
    Parameterized fixture for any nullable integer dtype.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    ra   rc   r0   r0   r1   Úany_int_ea_dtypeº  s    ru  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'
    ra   rc   r0   r0   r1   Úany_int_dtypeË  s    rv  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'
    ra   rc   r0   r0   r1   Úany_numeric_ea_dtypeå  s    rw  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]'
    ra   rc   r0   r0   r1   Úany_numeric_ea_and_arrow_dtypeû  s     rx  c                 C  s   | j S )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    ra   rc   r0   r0   r1   Úany_signed_int_ea_dtype  s    
ry  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'
    ra   rc   r0   r0   r1   Úany_real_numpy_dtype+  s    rz  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.
    ra   rc   r0   r0   r1   Úany_real_numeric_dtype@  s    r{  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'
    ra   rc   r0   r0   r1   Úany_numpy_dtypeW  s    "r|  c                 C  s   | j S )aí  
    Parameterized fixture for all real dtypes that can hold NA.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    * 'UInt8'
    * 'UInt16'
    * 'UInt32'
    * 'UInt64'
    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    * 'uint8[pyarrow]'
    * 'uint16[pyarrow]'
    * 'uint32[pyarrow]'
    * 'uint64[pyarrow]'
    * 'int8[pyarrow]'
    * 'int16[pyarrow]'
    * 'int32[pyarrow]'
    * 'int64[pyarrow]'
    * 'float[pyarrow]'
    * 'double[pyarrow]'
    ra   rc   r0   r0   r1   Úany_real_nullable_dtype|  s    r}  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'
    ra   rc   r0   r0   r1   Úany_numeric_dtypeœ  s    r~  rî   rÑ   ÚcÚmixedÚbytesó   aó   cró   zmixed-integerr¢   g       @Zfloatingg      ð?Úintegerzmixed-integer-floatÚdecimalÚ
datetime64z
2013-01-01z
2018-01-01r   rÓ   Z20180101r   iÝ  iâ  Úcomplexy      ð?      ð?y       @       @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¦   )rb   rQ   rŒ   r·   )rd   Zinferred_dtyper  r0   r0   r1   Ú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:)rD   )r9   ÚimportorskipZIPython.core.interactiveshellr‰  Ztraitlets.configrŠ  ZHistoryManagerZ	hist_file)r‰  rŠ  r  r0   r0   r1   Úip  s    rŒ  )ZbsrZcooZcscZcsrZdiaZdokZlilc                 C  s   t  d¡}t|| jd ƒS )z-
    Yields scipy sparse matrix classes.
    zscipy.sparseZ_matrix)r9   r‹  Úgetattrrb   )rd   Úsparser0   r0   r1   Ú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�  rR   Úoffsetsr�  )r±   Úor0   r0   r1   r²   .  s   þc                 C  s   | j S )zN
    Fixture for Tick based datetime offsets available for a time series.
    ra   rc   r0   r0   r1   Útick_classes-  s    r”  c                 C  s   | S r‚   r0   r[   r0   r0   r1   r]   ;  r^   c                 C  s   | j S )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    ra   rc   r0   r0   r1   Úsort_by_key;  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.
    ra   rc   r0   r0   r1   rÇ   D  s    rÇ   c                 C  s   | j S )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    ra   rc   r0   r0   r1   Úindexer_sliW  s    r—  c                 C  s   | j S )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    ra   rc   r0   r0   r1   Ú
indexer_li_  s    r˜  c                 C  s   | j S )z8
    Parametrize over __setitem__, iloc.__setitem__
    ra   rc   r0   r0   r1   Ú
indexer_sig  s    r™  c                 C  s   | j S )z7
    Parametrize over __setitem__, loc.__setitem__
    ra   rc   r0   r0   r1   Ú
indexer_slo  s    rš  c                 C  s   | j S )z:
    Parametrize over at.__setitem__, loc.__setitem__
    ra   rc   r0   r0   r1   Ú
indexer_alw  s    r›  c                 C  s   | j S )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    ra   rc   r0   r0   r1   Úindexer_ial  s    rœ  Úboolc                   C  s   t ddd�dkS )z>
    Fixture to check if the array manager is being used.
    úmode.data_managerT©ZsilentrŒ   r   r0   r0   r0   r1   Úusing_array_manager‡  s    r   c                   C  s   t jjjdu otddd�dkS )z7
    Fixture to check if Copy-on-Write is enabled.
    Trž  rŸ  Úblock©rR   ÚoptionsÚmodeZcopy_on_writer   r0   r0   r0   r1   Úusing_copy_on_write�  s    þr¥  c                   C  s   t jjjdkotddd�dkS )z?
    Fixture to check if Copy-on-Write is in warning mode.
    Úwarnrž  TrŸ  r¡  r¢  r0   r0   r0   r1   Úwarn_copy_on_writeš  s    þr§  c                   C  s   t jjjdu S )z=
    Fixture to check if infer string option is enabled.
    T)rR   r£  ÚfutureZinfer_stringr0   r0   r0   r1   Úusing_infer_string¥  s    r©  zEurope/Warsawzdateutil/Europe/Warsawc                 C  s   | j S )zE
    tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
    ra   rc   r0   r0   r1   Úwarsaw²  s    rª  c                   C  s   dS )N)r\  r_  r0   r0   r0   r0   r1   Úarrow_string_storageº  s    r«  (:  Ú__doc__Ú
__future__r   Úcollectionsr   r   r   r   r   r   r…  r	   ÚoperatorrJ  Útypingr
   r   Zdateutil.tzr   r   Z
hypothesisr   ÚstÚnumpyrQ   r9   Zpytzr   r   Zpandas._config.configr   Zpandas.util._test_decoratorsÚutilZ_test_decoratorsÚtdZpandas.core.dtypes.dtypesr   r   ZpandasrR   r   r   r   r   r   r   r   r   r   r   r   r    Zpandas._testingZ_testingÚtmZpandas.corer!   Zpandas.core.indexes.apir"   r#   Zpandas.util.versionr$   Úcollections.abcr%   r&   r\  ÚpaÚImportErrorZhas_pyarrowZzoneinfoZZoneInfoZZoneInfoNotFoundErrorr2   r<   rE   ZHealthCheckZtoo_slowZhypothesis_health_checksÚ__version__ÚappendZdiffering_executorsÚsettingsZregister_profileÚtupleZload_profileÚsplitr7   r�  Ztseriesr’  ÚclsZregister_type_strategyZbuildsZintegersZbooleansZfixturerS   rU   re   Z
axis_framerf   rg   rh   ri   rl   rq   rr   rs   rb   Z
skip_if_nory   rz   r{   r~   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×   rð   r  r·   r�  r¶   Zfrom_breaksZlinspacer  rv   r°   rø   ÚidxÚkeysrV   Zindex_fixture2rC   rý   Zindex_flat2r  r  r  r  r  Z_seriesr  ZNARROW_NP_DTYPESZ_narrow_seriesr  r  ZPYTHON_DATA_TYPESZ_typ_objects_seriesr  r   r"  r#  r%  r*  Zarithmetic_dunder_methodsr+  Ú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_reductionsr4  Z_all_boolean_reductionsr7  Z_all_reductionsr8  r9  r>  rE  Z_all_numeric_accumulationsrF  rG  rS  Z	TIMEZONESÚextendZTIMEZONE_IDSZparametrize_fixture_docr3   rU  rV  Ztz_aware_fixture2Z_UTCSrW  Zutc_fixture2r(  Zunit2ZSTRING_DTYPESr[  r]  r`  ra  Zstring_storage2ZBYTES_DTYPESrb  ZOBJECT_DTYPESrc  rd  ZDATETIME64_DTYPESre  ZTIMEDELTA64_DTYPESrf  rl  ZFLOAT_NUMPY_DTYPESrm  ZFLOAT_EA_DTYPESrn  ZALL_FLOAT_DTYPESro  ZCOMPLEX_DTYPESrp  ZCOMPLEX_FLOAT_DTYPESrq  ZSIGNED_INT_NUMPY_DTYPESrr  ZUNSIGNED_INT_NUMPY_DTYPESrs  ZALL_INT_NUMPY_DTYPESrt  ZALL_INT_EA_DTYPESru  ZALL_INT_DTYPESrv  rw  ZALL_INT_PYARROW_DTYPES_STR_REPRZFLOAT_PYARROW_DTYPES_STR_REPRrx  ZSIGNED_INT_EA_DTYPESry  ZALL_REAL_NUMPY_DTYPESrz  ZALL_REAL_DTYPESr{  ZALL_NUMPY_DTYPESr|  ZALL_REAL_NULLABLE_DTYPESr}  ZALL_NUMERIC_DTYPESr~  ZNAr†  Z_any_skipna_inferred_dtyper`   Ú_rˆ  rŒ  r�  Ú__all__r”  r•  rÇ   ÚsetitemÚlocZilocr—  r˜  r™  rš  Úatr›  Ziatrœ  r   r¥  r§  r©  Zwarsawsrª  r«  r0   r0   r0   r1   Ú<module>   sF  8

	<
öÿ
üþ

üþ











ùÿ
úÿ





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

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