o
    �¨Êhñ½  ã                   @  sV  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 eCyÀ   dZDY nw [BdZDddlEZEzeE Fd¡ W n eEjGyÛ   dZEY nw �d·dd„ZH�d¸dd„ZI�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 ]ZVeWe'jXjYeVƒZZe [eZej\eZe ]d&d'¡e ^¡ d(�¡ �qd) U¡ D ]"ZVeWe'jXjYeVƒZZe [eZej\eZe ]d*d+¡e ^¡ ej]d,d-d.�d/�¡ �q:d0 U¡ D ]"ZVeWe'jXjYeVƒZZe [eZej\eZe ]d1d2¡e ^¡ ej]d,d-d.�d3�¡ �qaej_dd4��d·d5d6„ƒZ`ej_dd4��d·d7d8„ƒZaej_g d9¢d:d;„ d<�d=d>„ ƒZbebZcej_d,d?gd@d;„ d<�dAdB„ ƒZdej_g dC¢dD�dEdF„ ƒZeej_g dC¢dD�dGdH„ ƒZfej_ddgdD�dIdJ„ ƒZgej_g dK¢dD�dLdM„ ƒZhej_g dN¢dD�dOdP„ ƒZiej_g dQ¢dD�dRdS„ ƒZjej_g dQ¢dD�dTdU„ ƒZkej_ddVdWdXdYdZejld[e" md\¡d]�gdD�d^d_„ ƒZnej_dVdWdXdYdZejld[e" md\¡d]�gdD�d`da„ ƒZoej_ddgdD�dbdc„ ƒZpej_g dd¢dD�dedf„ ƒZqej_dgdhgdD�didj„ ƒZrej_e6jsdkd;„ d<�dldm„ ƒZtetZuej_dejve'jwgdD�dndo„ ƒZxexZyej_e6jzdpd;„ d<�dqdr„ ƒZ{e{Z|ej_e)e.gdD�dsdt„ ƒZ}ej_e:e.gdudvgd<�dwdx„ ƒZ~e~Zej_e:e.e'j€gg dy¢d<�dzd{„ ƒZ�ej_e:e.e)e'j€gd|d;„ d<�d}d~„ ƒZ‚e‚Zƒej_�d¹d€d�„ƒZ„ej_�dºdƒd„„ƒZ…ej_d…d†„ ƒZ†ej_�d»dˆd‰„ƒZ‡ej_�d¼d‹dŒ„ƒZˆd�dŽ„ Z‰d�d�„ ZŠi d‘e:d’d“„ e‹d”ƒD ƒƒ“d•e1d–d”d—�“d˜e1d–d”d™dš�“d›e2d–d”dœd��“dže3dŸd”dœd �“d¡e-d”ƒ“d¢e:e Œd”¡d¢d£�“d¤e:e Œd”¡d¤d£�“d¥e:e Œd”¡d¥d£�“d¦e:e Œd”¡d¦d£�“d§e:e Œd”¡d§d£�“d¨e:e Œd”¡d¨d£�“d©e:e Œd”¡d©d£�“dªe:e Œd”¡dªd£�“d«e:e Œd”¡d«d£�“d¬e:e Œd”¡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�rKe:e'j€d¿d“„ e‹d”ƒD ƒdÀd£�ƒZ–e–e•dÁ< ej_e• —¡ dD�dÂdu„ ƒZ˜e˜Z™ej_dÃd“„ e• š¡ D ƒdD�dÄdÅ„ ƒZ›e›Zœej_dÆd“„ e• š¡ D ƒdD�dÇdÈ„ ƒZ�ej_�d½dÊdË„ƒZžej_�d½dÌdÍ„ƒZŸej_�d½dÎdÏ„ƒZ dÐdÑ„ Z¡dÒdÓ„ e• š¡ D ƒZ¢ej_�d½dÔdÕ„ƒZ£dÖdÓ„ e6j¤D ƒZ¥i e•¥e¢¥e¥¥Z¦ej_e¦ —¡ dD�d×dØ„ ƒZ§dÙdÓ„ e6j¨D ƒZ©i e•¥e¢¥e¥¥e©¥Zªej_eª —¡ dD�dÚdÛ„ ƒZ«ej_�d¼dÜdÝ„ƒZ¬ej_�d¼dÞdß„ƒZ­ej_�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dD�dôdõ„ ƒZ¯ej_e6j°dD�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dD�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dD�dúdû„ ƒZÍg dü¢ZÎej_eÎdD�dýdþ„ ƒZÏdÿ�d gZÐej_eÐdD��d�d„ ƒZÑeÎeÐ ZÒej_eÒdD��d�d„ ƒZÓej_ejÀejÁejÄejÅejÂejÃgdD��d�d„ ƒZÔej_g �d¢dD��d�d	„ ƒZÕej_g �d
¢dD��d�d„ ƒZÖg �d¢Z×ej_e×dD��d�d„ ƒZØej_�d�d„ ƒZÙej_�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ãdD��d)�d*„ ƒZäeäZåej_g �d+¢dD��d,�d-„ ƒZæeæZçej_e6jèdD��d.�d/„ ƒZéej_d½ejldÀe" m�d0¡d]�gdD��d1�d2„ ƒZêej_�d3ejl�d0e" m�d0¡d]�ejl�d4e" m�d0¡d]�gdD��d5�d6„ ƒZëej_�d7ejl�d0e" m�d0¡d]�gdD��d8�d9„ ƒZìeëZíej_e6jîdD��d:�d;„ ƒZïej_e6jðdD��d<�d=„ ƒZñej_�d>d½ejldÀe" m�d0¡d]�ejl�d?e" m�d0¡d]�gdD��d@�dA„ ƒZòej_e6jódD��dB�dC„ ƒZôej_e6jõdD��dD�dE„ ƒZöej_�d¿�dG�dH„ƒZ÷ej_e6jødD��dI�dJ„ ƒZùej_e6júdD��dK�dL„ ƒZûej_e6jüdD��dM�dN„ ƒZýej_e6jþdD��dO�dP„ ƒZÿej_e6�j dD��dQ�dR„ ƒ�Zej_e6�jdD��dS�dT„ ƒ�Zej_e6�jdD��dU�dV„ ƒ�Zej_e6�jdD��dW�dX„ ƒ�Zej_e6�jdD��dY�dZ„ ƒ�Z	ej_e6�j
dD��d[�d\„ ƒ�Zej_e6�je6jú dD��d]�d^„ ƒ�Zej_e6�je6jú e6�j e6�j dD��d_�d`„ ƒ�Zej_e6�jdD��da�db„ ƒ�Zej_e6�jdD��dc�dd„ ƒ�Zej_e6�jdD��de�df„ ƒ�Zej_e6�jdD��dg�dh„ ƒ�Zej_e6�jdD��di�dj„ ƒ�Zej_e6�jdD��dk�dl„ ƒ�Zd‘�dmejv�dngfd‘�dme'�j�dngf�do�dme'jw�dngf�dp�dqejv�drgf�dsejvejvejvgf�dsg f�dt�dmejv�dugf�do�dmejv�dvgf�dw�dxejv�dvgf�dyd,ejv�dugf�dzd,ejv�dvgf�d{ed,ƒejve�duƒgfd»dejvdgfd»de'�jdgf�d|e� �d}¡ejve� �d~¡gfd•e0�dƒejve0�d€ƒ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�duƒgf�d‡ed,ƒejve�duƒgfd›e,�d‚ƒe'jwe,�dƒƒgf�dˆe*dd,ƒejve*d�duƒ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�¢dD��dŽ�d�„ ƒ�Z#ej_�d�d“„ e'jY�j$D ƒdD��d‘�d’„ ƒ�Z%ej_d�d“d;„ gdD��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dD��dÀ�dš�d›„ƒ�Z'ej_e6�j(e6�j)e6�j*gdD��dœ�d�„ ƒ�Z+ej_e6�j)e6�j*gdD��dž�dŸ„ ƒ�Z,ej_e6�j(e6�j*gdD��d �d¡„ ƒ�Z-ej_e6�j(e6�j)gdD��d¢�d£„ ƒ�Z.ej_e6�j/e6�j)gdD��d¤�d¥„ ƒ�Z0ej_e6�j1e6�j*gdD��d¦�d§„ ƒ�Z2ej_�dÁ�d©�dª„ƒ�Z3ej_�dÁ�d«�d¬„ƒ�Z4ej_�dÁ�d­�d®„ƒ�Z5ej_�dÁ�d¯�d°„ƒ�Z6�d±�d²g�Z7eEdu�r�e7 OeE F�d±¡¡ ej_�e7dD��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ÚreturnÚNonec                 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)Ú	addoption)Úparser© r0   úA/var/www/html/env/lib/python3.10/site-packages/pandas/conftest.pyÚpytest_addoptiono   s
   
ýr2   Úitemúpytest.ItemÚpathÚstrÚmessagec                 C  s,   | j  |¡r|  tj d|› �¡¡ dS 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)r3   r5   r7   r0   r0   r1   Úignore_doctest_warningw   s   ÿr>   c                 C  sP   |  d¡p|j ddd�}g d¢}|r$| D ]}|D ]
\}}t|||ƒ qqd S d S )Nz--doctest-modulesz--doctest-cythonF)Údefault))Úis_int64_dtypezis_int64_dtype is deprecated)Úis_interval_dtypezis_interval_dtype is deprecated)Úis_period_dtypezis_period_dtype is deprecated)Úis_datetime64tz_dtypez#is_datetime64tz_dtype is deprecated)Úis_categorical_dtypez"is_categorical_dtype is deprecated)Ú	is_sparsezis_sparse is deprecated)úDataFrameGroupBy.fillnaz%DataFrameGroupBy.fillna is deprecated)úNDFrame.replacezThe 'method' keyword)rG   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.idxminrH   )zSeriesGroupBy.idxmaxrI   )zmissing.mask_zero_div_zerozdivide by zero encountered)Ú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)rF   z3DataFrameGroupBy.fillna with 'method' is deprecated)rF   z,DataFrame.fillna with 'method' is deprecated)Úread_parquetz1Passing a BlockManager to DataFrame is deprecated)Ú	getoptionr>   )ÚitemsÚconfigÚ
is_doctestÚignored_doctest_warningsr3   r5   r7   r0   r0   r1   Úpytest_collection_modifyitems‰   s   ÿ/ÿþrQ   z6.83.2Úci)ÚdeadlineÚsuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndi�ÿÿÿéc   )ÚnÚ	normalizez%YearBegin YearEnd BYearBegin BYearEndéûÿÿÿé   é   é   )Ú	min_valueÚ	max_value)rV   rW   Úmonthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndièÿÿÿé   )rV   rW   ÚstartingMonth)Úautousec                 C  s   t | d< t| d< dS )z:
    Make `np` and `pd` names available for doctests.
    ÚnpÚpdN)rb   rc   )Údoctest_namespacer0   r0   r1   Úadd_doctest_imports   s   re   c                   C  s   t  dd¡ dS )z<
    Configure settings for all tests and test modules.
    Úchained_assignmentÚraiseN)rc   Ú
set_optionr0   r0   r0   r1   Úconfigure_tests	  ó   ri   )r   rZ   ÚindexÚcolumnsc                 C  ó   dt | ƒ› �S ©Nzaxis=©Úrepr©Úxr0   r0   r1   Ú<lambda>  ó    rs   )ÚparamsÚidsc                 C  ó   | j S )z@
    Fixture for returning the axis numbers of a DataFrame.
    ©Úparam©Úrequestr0   r0   r1   Úaxis  ó   r|   rl   c                 C  rm   rn   ro   rq   r0   r0   r1   rs     rt   c                 C  rw   )zA
    Fixture for returning aliases of axis 1 of a DataFrame.
    rx   rz   r0   r0   r1   Úaxis_1  r}   r~   )TFN)ru   c                 C  rw   )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).
    rx   rz   r0   r0   r1   Úobserved'  ó   
r   c                 C  rw   )z6
    Boolean 'ordered' parameter for Categorical.
    rx   rz   r0   r0   r1   Úordered4  r}   r�   c                 C  rw   )z%
    Boolean 'skipna' parameter.
    rx   rz   r0   r0   r1   Úskipna<  r}   r‚   )ÚfirstÚlastFc                 C  rw   )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    rx   rz   r0   r0   r1   ÚkeepD  ó   r…   )ÚbothÚneitherÚleftÚrightc                 C  rw   )zA
    Fixture for trying all interval 'inclusive' parameters.
    rx   rz   r0   r0   r1   Úinclusive_endpoints_fixtureM  r}   r‹   )r‰   rŠ   r‡   rˆ   c                 C  rw   )z<
    Fixture for trying all interval closed parameters.
    rx   rz   r0   r0   r1   ÚclosedU  r}   rŒ   c                 C  rw   )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    rx   rz   r0   r0   r1   Úother_closed]  r}   r�   ÚgzipÚbz2ÚzipÚxzÚtarÚzstdÚ	zstandard)Úmarksc                 C  rw   )zK
    Fixture for trying common compression types in compression tests.
    rx   rz   r0   r0   r1   Úcompressione  ó   r–   c                 C  rw   )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    rx   rz   r0   r0   r1   Úcompression_onlyw  r—   r˜   c                 C  rw   )z,
    Fixture that an array is writable.
    rx   rz   r0   r0   r1   Úwritable‰  r}   r™   )ÚinnerÚouterr‰   rŠ   c                 C  rw   )z:
    Fixture for trying all types of join operations.
    rx   rz   r0   r0   r1   Ú	join_type‘  r}   rœ   ÚnlargestÚ	nsmallestc                 C  rw   )z1
    Fixture for trying all nselect methods.
    rx   rz   r0   r0   r1   Únselect_method™  r}   rŸ   c                 C  ó
   t | ƒjS ©N©ÚtypeÚ__name__rq   r0   r0   r1   rs   ¤  ó   
 c                 C  rw   )z/
    Fixture for each null type in pandas.
    rx   rz   r0   r0   r1   Únulls_fixture¤  r}   r¦   c                 C  rw   )zL
    Fixture for each null type in pandas, each null type exactly once.
    rx   rz   r0   r0   r1   Úunique_nulls_fixture¯  r}   r§   c                 C  r    r¡   r¢   rq   r0   r0   r1   rs   »  r¥   c                 C  rw   )z-
    Fixture for each NaT type in numpy.
    rx   rz   r0   r0   r1   Únp_nat_fixture»  r}   r¨   c                 C  rw   )z;
    Fixture to parametrize over DataFrame and Series.
    rx   rz   r0   r0   r1   Úframe_or_seriesÌ  r}   r©   rk   Úseriesc                 C  rw   )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
    rx   rz   r0   r0   r1   Úindex_or_seriesÔ  r€   r«   )rk   rª   Úarrayc                 C  rw   )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    rx   rz   r0   r0   r1   Úindex_or_series_or_arrayå  r}   r­   c                 C  rw   r¡   )r¤   rq   r0   r0   r1   rs   í  ó    c                 C  rw   )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    rx   rz   r0   r0   r1   Úbox_with_arrayí  r†   r¯   ú
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„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(   r)   )r¤   Ú
__module__Ú__qualname__r²   r0   r0   r0   r1   ÚTestSubDictÿ  s    r¹   )r±   )r¹   r0   r0   r1   Údict_subclassù  s   rº   útype[abc.Mapping]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„Zdd„ Zddd	„Zddd„ZdS )z5non_dict_mapping_subclass.<locals>.TestNonDictMappingr(   r)   c                 S  s
   || _ d S r¡   )Ú_data)r³   Úunderlying_dictr0   r0   r1   r²     ó   
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  ó
   | j  ¡ S r¡   )r¼   Ú__iter__©r³   r0   r0   r1   rÂ     r¾   z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Úintc                 S  rÁ   r¡   )r¼   Ú__len__rÃ   r0   r0   r1   rÅ     r¾   z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__Nr¶   )r(   r&   )r(   rÄ   )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)rl   rk   c                 S  rw   r¡   )Úyearrq   r0   r0   r1   rs   *  r®   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>c                 S  rw   r¡   )r^   rq   r0   r0   r1   rs   *  r®   c                 S  rw   r¡   )Údayrq   r0   r0   r1   rs   *  r®   c                 S  s   g | ]}|  d ¡‘qS )Úi8)Úastype)Ú.0Úlevr0   r0   r1   Ú
<listcomp>,  ó    zCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>)rÔ   r^   rÕ   T)Úinplace)r   rb   ÚrandomÚdefault_rngÚstandard_normalr"   ÚlistÚobjectr   ÚgroupbyÚsumrk   Ú
set_levelsÚlevelsÚ	set_names)ÚtdfÚ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ÚbazÚqux©ÚoneÚtwoÚthree)
r   r   r   rZ   rZ   rÉ   rÉ   é   ró   ró   )
r   rZ   rÉ   r   rZ   rZ   rÉ   r   rZ   rÉ   rƒ   Ú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©r8   ©rk   rl   )r   rb   rÝ   rÞ   rß   r"   )r÷   rk   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   rZ   rÉ   ró   ró   )r   rZ   r   rZ   r   rZ   rƒ   rô   F)rå   rõ   rö   Úverify_integrity)r"   rb   r¬   r#   )Ú
major_axisÚ
minor_axisÚmajor_codesÚminor_codesÚ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.
    rZ   rÉ   ÚaÚbÚ20130101ró   ú
US/Eastern©rÒ   Útzrï   )rö   )r#   Úfrom_productr   r0   r0   r0   r1   Ú_create_mi_with_dt64tz_level^  s   þr  Ústringc                 C  ó   g | ]}d |› �‘qS ©Úpandas_r0   ©rØ   Úir0   r0   r1   rÚ   j  rÛ   rÚ   rÊ   r   z
2020-01-01)rÒ   zdatetime-tzz
US/Pacificr
  ÚperiodÚDrÑ   r   z1 day)ÚstartrÒ   rÓ   ÚrangeÚint8rÍ   Úint16Úint32Úint64Úuint8Úuint16Úuint32Úuint64Úfloat32Úfloat64zbool-objectÚ	complex64y              ð?Ú
complex128Úabcdé   ée   )Únum)rë   rì   rí   )rZ   rÉ   ró   )r   r   rZ   rZ   rÉ   rÉ   ÚInt64ÚUInt16ÚFloat32Úbooleanc                 C  r  r  r0   r  r0   r0   r1   rÚ   Ž  rÛ   zstring[python])ú
bool-dtyper"  r#  ÚcategoricalÚintervalÚemptyÚtuplesúmi-with-dt64tz-levelÚmultiÚrepeatsÚnullable_intÚnullable_uintÚnullable_floatÚnullable_boolzstring-pythonc                 C  r  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_dictry   Úcopyrz   r0   r0   r1   rk   –  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.
    )ry   r8  r9  )r{   rÀ   r0   r0   r1   Ú
index_flat©  s   	r=  c                 C  s0   g | ]\}}|  d ¡s|dv st|tƒs|‘qS ))rÄ   ÚuintÚfloat)r  r/  r3  r,  )Ú
startswithr:  r#   r;  r0   r0   r1   rÚ   »  s    üþüc                 C  s„   t | j jdd�}|j ¡ }| jdv r4| ¡ }d|d dd…  |d< d|d dd…  |d< t |¡S d|d< d|d< t|ƒ|ƒ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)r0  r1  r2  r¡   r   rZ   Néÿÿÿÿ)r8  ry   r9  ÚvaluesÚtolistr#   Úfrom_tuplesr£   )r{   ÚindÚvalsr0   r0   r1   Úindex_with_missingº  s   


rI  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  r  )Úi_r0   r  r0   r0   r1   rÚ   é  rÛ   z!string_series.<locals>.<listcomp>rª   ©rk   r8   )r   rb   Úaranger!  r"   r  rá   r0   r0   r0   r1   Ústring_seriesâ  s
   ýrN  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  r  ©Úfoo_r0   r  r0   r0   r1   rÚ   ó  rÛ   z!object_series.<locals>.<listcomp>rJ  c                 S  r  )Úbar_r0   r  r0   r0   r1   rÚ   ô  rÛ   rÍ   Úobjects©rk   r8   rÎ   )r  r"   rá   r   )Údatark   r0   r0   r1   Úobject_seriesî  s   rU  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É   rJ  rÏ   rÐ   rÑ   ÚtsrL  )r   rb   rÝ   rÞ   rß   r   r0   r0   r0   r1   Údatetime_seriesø  s
   ýrW  c                 C  s*   t | ƒ}tj d¡ |¡}t|| ddd�S )zHelper for the _series dictrÉ   r  F)rk   r8   r9  )Úlenrb   rÝ   rÞ   rß   r   )rk   ÚsizerT  r0   r0   r1   Ú_create_series  s   rZ  c                 C  s"   i | ]\}}d |› d�t |ƒ“qS )zseries-with-z-index©rZ  )rØ   Úindex_idrk   r0   r0   r1   Ú
<dictcomp>  s    ÿÿr]  c                 C  s   t | ƒS )zE
    Fixture for tests on series with changing types of indices.
    r[  ©rk   r0   r0   r1   Úseries_with_simple_index  s   r_  c              	   C  s8   i | ]}|j › d �ttdƒdd„ tdƒD ƒd|d�“qS )ú-seriesrJ  c                 S  r  )zi-r0   r  r0   r0   r1   rÚ     rÛ   z<dictcomp>.<listcomp>r  rS  )r¤   r   r  ©rØ   rÎ   r0   r0   r1   r]    s    ýÿÿc                 C  ó   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
    TrA  )Ú_index_or_series_objsry   r9  rz   r0   r0   r1   Úindex_or_series_obj$  s   rd  c                 C  s   i | ]}|j › d �t|ƒ“qS )r`  )r¤   r   ra  r0   r0   r1   r]  -  s    ÿc                 C  rb  )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
    TrA  )Ú_index_or_series_memory_objsry   r9  rz   r0   r0   r1   Úindex_or_series_memory_obj:  s   rf  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']
    ©rJ  rË   rÍ   c                 S  r  rO  r0   r  r0   r0   r1   rÚ   P  rÛ   zint_frame.<locals>.<listcomp>rJ  rÌ   rý   )r   rb   Úonesr  r"   r  rá   rà   r0   r0   r0   r1   Ú	int_frameG  s
   ýri  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É   rg  c                 S  r  rO  r0   r  r0   r0   r1   rÚ   ^  rÛ   zfloat_frame.<locals>.<listcomp>rJ  rÌ   rý   )r   rb   rÝ   rÞ   rß   r"   r  rà   r0   r0   r0   r1   Úfloat_frameU  s
   
ýrj  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Ð  rZ   rÉ   ró   rË   rY   r^  )r   r   rb   rÝ   rÞ   rß   rX  )Údatesr0   r0   r1   Ú(rand_series_with_duplicate_datetimeindexc  s   









örl  )r‰   rŠ   rŠ   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  rw   r¡   rx   rz   r0   r0   r1   Úea_scalar_and_dtype{  ó   rq  c                 C  rw   )zD
    Fixture for dunder names for common arithmetic operations.
    rx   rz   r0   r0   r1   Úall_arithmetic_operators‘  r}   rs  c                 C  rw   )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    rx   rz   r0   r0   r1   Úall_binary_operators™  ó   "rt  c                 C  rw   )z¬
    Fixture for operator and roperator arithmetic functions.

    Notes
    -----
    This includes divmod and rdivmod, whereas all_arithmetic_operators
    does not.
    rx   rz   r0   r0   r1   Úall_arithmetic_functions¾  s   rv  )Úcountrã   ÚmaxÚminÚmeanÚprodÚstdÚvarÚmedianÚkurtÚskewÚsemc                 C  rw   )z.
    Fixture for numeric reduction names.
    rx   rz   r0   r0   r1   Úall_numeric_reductionsì  r}   r‚  ÚallÚanyc                 C  rw   )z.
    Fixture for boolean reduction names.
    rx   rz   r0   r0   r1   Úall_boolean_reductions÷  r}   r…  c                 C  rw   )z>
    Fixture for all (boolean + numeric) reduction names.
    rx   rz   r0   r0   r1   Úall_reductions  r}   r†  c                 C  rw   )z;
    Fixture for operator module comparison functions.
    rx   rz   r0   r0   r1   Úcomparison_op
  rr  r‡  )Ú__le__Ú__lt__Ú__ge__Ú__gt__c                 C  rw   )zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    rx   rz   r0   r0   r1   Úcompare_operators_no_eq_ne  r€   rŒ  )Ú__and__Ú__rand__Ú__or__Ú__ror__Ú__xor__Ú__rxor__c                 C  rw   )zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    rx   rz   r0   r0   r1   Úall_logical_operators(  ó   r“  )ÚcumsumÚcumprodÚcumminÚcummaxc                 C  rw   )z0
    Fixture for numeric accumulation names
    rx   rz   r0   r0   r1   Úall_numeric_accumulations9  r}   r™  c                 C  s
   |   d¡S )zR
    Returns the configuration for the test setting `--no-strict-data-files`.
    r*   )rL   )Úpytestconfigr0   r0   r1   Ústrict_data_filesD  s   
r›  úCallable[..., str]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 |¡s#ˆrt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Ú
ValueErrorr;   Úskip)r´   r5   ©Ú	BASE_PATHr›  r0   r1   Údecoa  s   
ÿzdatapath.<locals>.deco)rŸ  r5   r   ÚdirnameÚ__file__)r›  r¦  r0   r¤  r1   ÚdatapathL  s   
r©  z
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporez+01:15z-02:15z	UTC+01:15z	UTC-02:15i,  iÔþÿÿ)ÚhoursrC  rë   rü   c                 C  s   g | ]}t |ƒ‘qS r0   ro   r  r0   r0   r1   rÚ   Œ  s    c                 C  rw   )zD
    Fixture for trying timezones including default (None): {0}
    rx   rz   r0   r0   r1   Útz_naive_fixture�  r†   r«  c                 C  rw   )z4
    Fixture for trying explicit timezones: {0}
    rx   rz   r0   r0   r1   Útz_aware_fixture˜  r†   r¬  r   zdateutil/UTCc                 C  rw   )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    rx   rz   r0   r0   r1   Úutc_fixtureª  r}   r­  )rn  ÚmsÚusÚnsc                 C  rw   )z&
    datetime64 units we support.
    rx   rz   r0   r0   r1   ro  µ  r}   ro  c                 C  rw   )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    rx   rz   r0   r0   r1   Ústring_dtypeÃ  ó   	r±  Úpyarrowc                 C  rw   )za
    Parametrized fixture for string dtypes.

    * 'string[python]'
    * 'string[pyarrow]'
    rx   rz   r0   r0   r1   Únullable_string_dtypeÏ  ó   r´  ÚpythonÚpyarrow_numpyc                 C  rw   )zx
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    * 'pyarrow_numpy'
    rx   rz   r0   r0   r1   Ústring_storageß  r—   r¸  Únumpy_nullablec                 C  rw   )zb
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    rx   rz   r0   r0   r1   Údtype_backendñ  rµ  rº  c                 C  rw   )zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    rx   rz   r0   r0   r1   Úbytes_dtype  ó   r»  c                 C  rw   )zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    rx   rz   r0   r0   r1   Úobject_dtype  r¼  r½  rá   zstring[pyarrow_numpy]c                 C  rw   )zo
    Parametrized fixture for string dtypes.
    * 'object'
    * 'string[python]'
    * 'string[pyarrow]'
    rx   rz   r0   r0   r1   Úany_string_dtype  r—   r¾  c                 C  rw   )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    rx   rz   r0   r0   r1   Údatetime64_dtype-  r¼  r¿  c                 C  rw   )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    rx   rz   r0   r0   r1   Útimedelta64_dtype8  r¼  rÀ  r   c                	   C  s   t dddddddd�S )z-
    Fixture emits fixed Timestamp.now()
    iå  rZ   r[   rË   é   é   )rÔ   r^   rÕ   ÚhourÚminuterô   Úmicrosecond)r   r0   r0   r0   r1   Úfixed_now_tsC  s   ÿrÆ  c                 C  rw   )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    rx   rz   r0   r0   r1   Úfloat_numpy_dtypeM  r²  rÇ  c                 C  rw   )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    rx   rz   r0   r0   r1   Úfloat_ea_dtypeY  r¼  rÈ  c                 C  rw   )z~
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    rx   rz   r0   r0   r1   Úany_float_dtyped  r”  rÉ  c                 C  rw   )zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    rx   rz   r0   r0   r1   Úcomplex_dtyper  r²  rÊ  c                 C  rw   )z£
    Parameterized fixture for complex and numpy float dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    * float
    * 'float32'
    * 'float64'
    rx   rz   r0   r0   r1   Úcomplex_or_float_dtype~  s   rË  c                 C  rw   )z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    rx   rz   r0   r0   r1   Úany_signed_int_numpy_dtype�  r”  rÌ  c                 C  rw   )zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    rx   rz   r0   r0   r1   Úany_unsigned_int_numpy_dtype›  r€   rÍ  c                 C  rw   )z³
    Parameterized fixture for any integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    rx   rz   r0   r0   r1   Úany_int_numpy_dtype¨  r—   rÎ  c                 C  rw   )z²
    Parameterized fixture for any nullable integer dtype.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    rx   rz   r0   r0   r1   Úany_int_ea_dtypeº  rr  rÏ  c                 C  rw   )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'
    rx   rz   r0   r0   r1   Úany_int_dtypeË  s   rÐ  c                 C  rw   )zî
    Parameterized fixture for any nullable integer dtype and
    any float ea dtypes.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    rx   rz   r0   r0   r1   Úany_numeric_ea_dtypeå  s   rÑ  c                 C  rw   )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]'
    rx   rz   r0   r0   r1   Úany_numeric_ea_and_arrow_dtypeû  s    rÒ  c                 C  rw   )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    rx   rz   r0   r0   r1   Úany_signed_int_ea_dtype  r€   rÓ  c                 C  rw   )zí
    Parameterized fixture for any (purely) real numeric dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    rx   rz   r0   r0   r1   Úany_real_numpy_dtype+  s   rÔ  c                 C  rw   )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.
    rx   rz   r0   r0   r1   Úany_real_numeric_dtype@  s   rÕ  c                 C  rw   )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'
    rx   rz   r0   r0   r1   Úany_numpy_dtypeW  ru  rÖ  c                 C  rw   )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]'
    rx   rz   r0   r0   r1   Úany_real_nullable_dtype|  s   r×  c                 C  rw   )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'
    rx   rz   r0   r0   r1   Úany_numeric_dtypeœ  s   rØ  r  ÚcÚmixedÚbytesó   aó   cr/  zmixed-integerrÉ   g       @Úfloatingg      ð?Úintegerzmixed-integer-floatÚdecimalÚ
datetime64z
2013-01-01z
2018-01-01r  Ú20180101r   iÝ  iâ  Úcomplexy      ð?      ð?y       @       @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Í   )ry   rb   r¬   rá   )r{   Úinferred_dtyperD  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.
    ÚIPythonz6.0.0)Ú
minversionr   )ÚInteractiveShell)ÚConfigz:memory:)rN   )r;   ÚimportorskipÚIPython.core.interactiveshellrè  Útraitlets.configré  ÚHistoryManagerÚ	hist_file)rè  ré  rÙ  r0   r0   r1   Úip  s   
rï  )ÚbsrÚcooÚcscÚcsrÚdiaÚdokÚlilc                 C  s   t  d¡}t|| jd ƒS )z-
    Yields scipy sparse matrix classes.
    zscipy.sparseÚ_matrix)r;   rê  Úgetattrry   )r{   Ú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ø  rc   Úoffsetsrû  )rØ   Úor0   r0   r1   rÚ   .  s    ý
þc                 C  rw   )zN
    Fixture for Tick based datetime offsets available for a time series.
    rx   rz   r0   r0   r1   Útick_classes-  r”  rÿ  c                 C  s   | S r¡   r0   rq   r0   r0   r1   rs   ;  s    c                 C  rw   )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    rx   rz   r0   r0   r1   Úsort_by_key;  r†   r   )rë   NN)ÚEgonÚVenkmanN)ÚNCC1701Dr  r  ú#tuple[Hashable, Hashable, Hashable]c                 C  rw   )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    rx   rz   r0   r0   r1   rö   D  s   rö   c                 C  rw   )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    rx   rz   r0   r0   r1   Úindexer_sliW  r}   r  c                 C  rw   )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    rx   rz   r0   r0   r1   Ú
indexer_li_  r}   r  c                 C  rw   )z8
    Parametrize over __setitem__, iloc.__setitem__
    rx   rz   r0   r0   r1   Ú
indexer_sig  r}   r  c                 C  rw   )z7
    Parametrize over __setitem__, loc.__setitem__
    rx   rz   r0   r0   r1   Ú
indexer_slo  r}   r  c                 C  rw   )z:
    Parametrize over at.__setitem__, loc.__setitem__
    rx   rz   r0   r0   r1   Ú
indexer_alw  r}   r	  c                 C  rw   )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    rx   rz   r0   r0   r1   Úindexer_ial  r}   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©Úsilentr¬   r   r0   r0   r0   r1   Úusing_array_manager‡  rj   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©rc   ÚoptionsÚmodeÚcopy_on_writer   r0   r0   r0   r1   Úusing_copy_on_write�  ó   þ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š  r  r  c                   C  s   t jjjdu S )z=
    Fixture to check if infer string option is enabled.
    T)rc   r  ÚfutureÚinfer_stringr0   r0   r0   r1   Úusing_infer_string¥  s   r  zEurope/Warsawzdateutil/Europe/Warsawc                 C  rw   )zE
    tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
    rx   rz   r0   r0   r1   Úwarsaw²  r}   r  c                   C  s   dS )N)r³  r·  r0   r0   r0   r0   r1   Úarrow_string_storageº  s   r  r¶   )r3   r4   r5   r6   r7   r6   r(   r)   )r(   r°   )r(   r»   )r(   r#   )r(   r   )r(   r   )r›  r6   r(   rœ  )r(   r   )r(   r  )r(   r  )r(   r6   (:  Ú__doc__Ú
__future__r   Úcollectionsr   r   r   r   r   r   rà  r	   ÚoperatorrŸ  Útypingr
   r   Údateutil.tzr   r   Ú
hypothesisr   ÚstÚnumpyrb   r;   Úpytzr   r   Úpandas._config.configr   Úpandas.util._test_decoratorsÚutilÚ_test_decoratorsÚtdÚpandas.core.dtypes.dtypesr   r   Úpandasrc   r   r   r   r   r   r   r   r   r   r   r   r    Úpandas._testingÚ_testingÚtmÚpandas.corer!   Úpandas.core.indexes.apir"   r#   Úpandas.util.versionr$   Úcollections.abcr%   r&   r³  ÚpaÚImportErrorÚhas_pyarrowÚzoneinfoÚZoneInfoÚZoneInfoNotFoundErrorr2   r>   rQ   ÚHealthCheckÚtoo_slowÚhypothesis_health_checksÚ__version__ÚappendÚdiffering_executorsÚsettingsÚregister_profileÚtupleÚload_profileÚsplitr8   rø  Útseriesrý  ÚclsÚregister_type_strategyÚbuildsÚintegersÚbooleansÚfixturere   ri   r|   Ú
axis_framer~   r   r�   r‚   r…   r‹   rŒ   r�   ry   Ú
skip_if_nor–   r˜   r™   rœ   rŸ   ÚNULL_OBJECTSr¦   Únulls_fixture2ÚnanÚNaTr§   Úunique_nulls_fixture2ÚNP_NAT_OBJECTSr¨   Únp_nat_fixture2r©   r«   Úindex_or_series2r¬   r­   r¯   Úbox_with_array2rº   rÈ   ré   r÷   rþ   r  r  r  rM  rá   r  rà   Úfrom_breaksÚlinspacerF  r�   r×   r8  ÚidxÚkeysrk   Úindex_fixture2rM   r=  Úindex_flat2rI  rN  rU  rW  rZ  Ú_seriesr_  ÚNARROW_NP_DTYPESÚ_narrow_seriesrc  rd  ÚPYTHON_DATA_TYPESÚ_typ_objects_seriesre  rf  ri  rj  rl  rq  Úarithmetic_dunder_methodsrs  ÚaddÚraddÚsubÚrsubÚmulÚrmulÚtruedivÚrtruedivÚfloordivÚ	rfloordivÚmodÚrmodÚpowÚrpowÚeqÚneÚltÚleÚgtÚgeÚand_Úrand_ÚxorÚrxorÚor_Úror_rt  rv  Ú_all_numeric_reductionsr‚  Ú_all_boolean_reductionsr…  Ú_all_reductionsr†  r‡  rŒ  r“  Ú_all_numeric_accumulationsr™  r›  r©  Ú	TIMEZONESÚextendÚTIMEZONE_IDSÚparametrize_fixture_docr6   r«  r¬  Útz_aware_fixture2Ú_UTCSr­  Úutc_fixture2ro  Úunit2ÚSTRING_DTYPESr±  r´  r¸  rº  Ústring_storage2ÚBYTES_DTYPESr»  ÚOBJECT_DTYPESr½  r¾  ÚDATETIME64_DTYPESr¿  ÚTIMEDELTA64_DTYPESrÀ  rÆ  ÚFLOAT_NUMPY_DTYPESrÇ  ÚFLOAT_EA_DTYPESrÈ  ÚALL_FLOAT_DTYPESrÉ  ÚCOMPLEX_DTYPESrÊ  ÚCOMPLEX_FLOAT_DTYPESrË  ÚSIGNED_INT_NUMPY_DTYPESrÌ  ÚUNSIGNED_INT_NUMPY_DTYPESrÍ  ÚALL_INT_NUMPY_DTYPESrÎ  ÚALL_INT_EA_DTYPESrÏ  ÚALL_INT_DTYPESrÐ  rÑ  ÚALL_INT_PYARROW_DTYPES_STR_REPRÚFLOAT_PYARROW_DTYPES_STR_REPRrÒ  ÚSIGNED_INT_EA_DTYPESrÓ  ÚALL_REAL_NUMPY_DTYPESrÔ  ÚALL_REAL_DTYPESrÕ  ÚALL_NUMPY_DTYPESrÖ  ÚALL_REAL_NULLABLE_DTYPESr×  ÚALL_NUMERIC_DTYPESrØ  ÚNArá  Ú_any_skipna_inferred_dtyperv   Ú_rå  rï  rú  Ú__all__rÿ  r   rö   ÚsetitemÚlocÚilocr  r  r  r  Úatr	  Úiatr
  r  r  r  r  Úwarsawsr  r  r0   r0   r0   r1   Ú<module>   sp   8ÿÿ

<öÿ
üþ

üþ











ùÿ
úÿ













ÿþýüûúùø	÷
öõôóòñðïÿÿ
ÿÜ( 
ÿÿ
	þÿ
	þü
ÿÿþýü


þ÷ÿ
	
æÿ
òÿ





úÿ
ÿ


%î
þÿ

þÿ
ýÿþÿ

üÿ


	
ÿþýÿ$#$$ç2	þÿøÿ


