
    _ri                    7   U 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ZddlmZmZ ddl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 ddlmc 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.m/Z/m0Z0m1Z1m2Z2 ddl3m4Z5 ddl6m7Z7 ddl8m9Z9m:Z: er
ddl;m<Z<m=Z=m>Z> 	 ddl?Z@[@dZAn# eB$ r dZAY nw xY w edd          ZCdhdZDd ZEdidZFdhdZGejH        I                    d ddd!ejJ        jK        ejJ        jL        f"           ejH        M                    d            d#N                                D ]VZO ePe&jQ        jR        eO          ZS ejT        eS ejU        eS ejV        d$d%           ejW                    &                     Wd'N                                D ]gZO ePe&jQ        jR        eO          ZS ejT        eS ejU        eS ejV        d(d)           ejW                     ejV        d*d+,          -                     hd.N                                D ]gZO ePe&jQ        jR        eO          ZS ejT        eS ejU        eS ejV        d/d0           ejW                     ejV        d*d+,          1                     h ejX        d2          dhd3            ZY ejX        d2          dhd4            ZZ ejX        g d5d6 7          d8             Z[ ejX        ddg9          d:             Z\ ejX        g d;9          d<             Z] ejX        ddg9          d=             Z^ ejX        ddg9          d>             Z_ ejX        ddg9          d?             Z` ejX        g d@9          dA             Za ejX        g dB9          dC             Zb ejX        g dD9          dE             Zc ejX        g dD9          dF             Zd ejX        ddGdHdIdJdK eje        dL e!jf        dM          N          g9          dO             Zg ejX        dGdHdIdJdK eje        dL e!jf        dM          N          g9          dP             Zh ejX        ddg9          dQ             Zi ejX        g dR9          dS             Zj ejX        dTdUg9          dV             Zk ejX        ddg9          dW             Zl ejX        ddg9          dX             Zm ejX        g dY9          dZ             Zn ejX        ddg9          d[             Zo ejX        ddg9          d\             Zp ejX        ddg9          d]             Zq ejX        dg9          d^             Zr ejX        dg9          d_             Zs ejX        e5jt        d` 7          da             ZueuZv ejX        dejw        e&jx        g9          db             ZyeyZz ejX        e5j{        dc 7          dd             Z|e|Z} ejX        e(e-g9          de             Z~ ejX        e9e-gdfdgg7          dh             Z ejX        e9e-e&j        gg di7          dj             Z ejX        e9e-e(e&j        gdk 7          dl             ZeZejX        djdn            ZejX        dkdp            ZejX        dq             ZejX        dlds            ZejX        dmdu            Zdv Zdw Zi dx e9dy  edz          D             e{          d| e9d}  edz          D             d{          d~ e0ddz          d e0ddzd          d e1ddzd          d e2ddzd          d e,dz          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          i d e9ddgd)z  e{          d e9ddgd)z  e{          d e9 ej        dzd{          d ej        dzd{          z  z             d e9 ej        dzd{          d ej        dzd{          z  z             d e' ed          dz            d e*j         ej        ddd                    d e9g           d e:j         eg dg dd                    d e            d e            d e9g d          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz          d{          d e9 ej        dz                              e          d{          d e9 e&j        d  edz          D             d{                    ZeAr3 e9 e&j        d  edz          D             d{                    Zeed<    ejX        e                                9          d             Z ejX        d e                                D             9          d             Z ejX        d e                                D             9          d             ZejX        dnd            ZejX        dnd            ZejX        dnd            Zd Zd e                                D             ZejX        dndÄ            ZdĄ e5j        D             Zi eeeZ ejX        e                                9          dń             ZdƄ e5j        D             Zi eeeeZ ejX        e                                9          dǄ             ZejX        dmdȄ            ZejX        dmdɄ            ZejX        dndʄ            Z ejX         e)dd)˦           e$dd̦          f e)ddά˦           e$dd̦          f e+ddЬѦ          df e+ddѦ          df e/dd֬צ                              dئ           e#dd֬٦          f e.dڬۦ          dfg9          d݄             Z ejX        e5j        9          dބ             Z ejX        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        ej        ej        ej        ej        ej        ej        e7j        ej        e7j        ej        e7j        g9          d߄             Z ejX        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        ej        e7j        g9          d             Zg dZ ejX        eͬ9          d             ZddgZ ejX        eϬ9          d             Zeez   Z ejX        eѬ9          d             Z ejX        ej        ej        ej        ej        ej        ej        g9          d             Z ejX        g d9          d             Z ejX        g d9          d             Zg dZ ejX        e֬9          d             ZejX        d             ZejX        dod            Zdddddddddd e             e            e	j         e	 ed*                     e	 ed          d          gZeCye۠                    eC                    d          eC                    d          eC                    d          eC	                    d          eC	                    d          f           d  eD             Z e!j         eeަ                     ejX        eeެ7          d                         Z e!j         eed*d                              ejX        ed*d         ed*d         7          d                         Zdd e            e	j        gZeCe                    eCj                    ejX        e9          d             ZeZ ejX        g d9          d             ZeZ ejX        e5j        9          d             Z ejX        d	e&j        f eje        d
e&j        f e!jf        d
          N           eje        d
ejw        f e!jf        d
          N          d	ejw        fgg d7          d             Z ejX        d eje        d e!jf        d
          N          g9          d             Z ejX         eje        d
ejw        f e!jf        d
          N           eje        d
e&j        f e!jf        d
          N          g9          d             Z ejX        d	 eje        d
 e!jf        d
          N          g9          d             Z ejX        d	e&j        f eje        d
e&j        f e!jf        d
          N           eje        d
ejw        f e!jf        d
          N          d	ejw        fgg d7          d             Z ejX        d eje        d
 e!jf        d
          N          g9          d             ZeZeZ ejX        e5j        9          d             Z ejX        e5j        9          d             Z ejX         ej        dx          d	e&j        f eje        d
e&j        f e!jf        d
          N           eje        d
ejw        f e!jf        d
          N          d	ejw        fgg d7          d             ZeZ ejX        e5j        9          d             Z ejX        e5j        9          d             ZejX        dpd            Z ejX        e5j         9          d             Z ejX        e5j        9          d             Z ejX        e5j        9          d             Z ejX        e5j        9          d             Z ejX        e5j        9          d             Z	 ejX        e5j
        9          d              Z ejX        e5j        9          d!             Z ejX        e5j        9          d"             Z ejX        e5j        9          d#             Z ejX        e5j        9          d$             Z ejX        e5j        e5j        z   9          d%             Z ejX        e5j        e5j        z   e5j        z   e5j        z   9          d&             Z ejX        e5j        9          d'             Z ejX        e5j        9          d(             Z ejX        e5j        9          d)             Z ejX        e5j        9          d*             Z ejX        e5j         9          d+             Z! ejX        e5j"        9          d,             Z#d|d-ejw        d.gfd|d-e&j        d.gfd/d-e&jx        d.gfd0d1ejw        d2gfdejw        ejw        ejw        gfdg fd3d-ejw        dgfd/d-ejw        d4gfd5d6ejw        d4gfd7d*ejw        dgfd8d*ejw        d4gfd9 ed*          ejw         ed          gfddejw        dgfdde&j        dgfd: ej$        d;          ejw         ej$        d<          gfd~ e/d=          ejw         e/d>          gfd? ed@d*d*          ejw         edAd*d*          gfdBdCejw        dDgfd ed*          ejw         ed          gfdE ed*          ejw         ed          gfd e+d@          e&jx         e+dA          gfd e)dd*          ejw         e)dd          gfgZ%dF e%D             Z& ejX        e%e&7          dG             Z'ejX        dH             Z(ejX        dI             Z) ejX        dJ e&jR        j*        D             9          dK             Z+ ejX        ddL g9          dM             Z, ejX        dNdOdPejw        ejw        ejw        fejw        e&jx        dfejw        e&j        dfe&j        e&j        e&j        fg9          dqdR            Z- ejX        e5j.        e5j/        e5j0        g9          dS             Z1 ejX        e5j/        e5j0        g9          dT             Z2 ejX        e5j.        e5j0        g9          dU             Z3 ejX        e5j.        e5j/        g9          dV             Z4 ejX        e5j5        e5j/        g9          dW             Z6 ejX        e5j7        e5j0        g9          dX             Z8 ejX        ddg9          drdZ            Z9ejX        dsd\            Z:ejX        dsd]            Z;d^d_gZ<d`e=da<   eC*e<                    eC	                    d^                      ejX        e<9          dtdb            Z>ejX        dc             Z? ejX        dde          df             Z@ ejX        ddg9          dg             ZAdS (u  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Any)tzlocaltzutc)
strategies)import_optional_dependency)DatetimeTZDtypeIntervalDtype)CategoricalIndex	DataFrameIntervalIntervalIndexPeriod
RangeIndexSeries	Timedelta	Timestamp
date_rangeperiod_rangetimedelta_range)ops)Index
MultiIndex)CallableHashableIteratorTFpytzignore)errorsreturnNonec                6    |                      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)parsers    g/var/www/html/bestrading.cuttalo.com/models/btc_v9/venv/lib/python3.11/site-packages/pandas/conftest.pypytest_addoptionr2   h   s2    
 E          c                V    dd l }dd l|j        j        fd}||j        _        d S )Nr   c                ^                         |          rd|j        v rdS  | ||          S )N.T)
isfunction__qualname__)selfmoduleobjectinspectorigs      r1   _from_modulez)pytest_sessionstart.<locals>._from_modulez   sA    f%% 	#1D*D*D 4tD&&)))r3   )doctestr<   DocTestFinderr>   )sessionr?   r>   r<   r=   s      @@r1   pytest_sessionstartrB   p   sT    NNNNNN  -D* * * * * * *6G&&&r3   itempytest.Itempathstrmessagec                    | j                             |          r7|                     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.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)rC   rE   rG   s      r1   ignore_doctest_warningrO      sZ     y$ I223FW3F3FGGHHHHHI Ir3   c                    |                     d          p|                     dd          }g d}|r| D ]}|D ]\  }}t          |||           d S d S )Nz--doctest-modulesz--doctest-cythonF)default))zapi.interchange.from_dataframe"The DataFrame Interchange Protocol)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)z&CategoricalDtype._from_values_or_dtypezConstructing a Categorical)zDataFrame.__dataframe__rR   )DataFrameGroupBy.fillnaz%DataFrameGroupBy.fillna is deprecated)zDataFrameGroupBy.corrwithz'DataFrameGroupBy.corrwith is deprecated)zNDFrame.replacez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.idxminrZ   )zSeriesGroupBy.idxmaxr[   )to_pytimedeltaz2The behavior of TimedeltaProperties.to_pytimedelta)zNDFrame.reindex_likez'keyword argument 'method' is deprecated)zmissing.mask_zero_div_zerozdivide by zero encountered)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)rY   z3DataFrameGroupBy.fillna with 'method' is deprecated)read_parquetz1Passing a BlockManager to DataFrame is deprecated)	getoptionrO   )itemsconfig
is_doctestignored_doctest_warningsrC   rE   rG   s          r1   pytest_collection_modifyitemsrc      s    !!"566 &:J:JE ;K ; ;J%  %  % N  < 	< 	<D!9 < <g&tT7;;;;<< <	< 	<r3   	pandas_ci   )databasedeadlinemax_examplessuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndic   )n	normalizez%YearBegin YearEnd BYearBegin BYearEnd         )	min_value	max_value)rk   rl   monthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndi   )rk   rl   startingMonth)autousec                .    t           | d<   t          | d<   dS )z:
    Make `np` and `pd` names available for doctests.
    nppdN)rx   ry   )doctest_namespaces    r1   add_doctest_importsr{     s     
 !d dr3   c                 0    t          j        dd           dS )z<
    Configure settings for all tests and test modules.
    chained_assignmentraiseN)ry   
set_option r3   r1   configure_testsr     s    
 M&00000r3   )r   ro   indexcolumnsc                    d| S )Nzaxis=r   xs    r1   <lambda>r     s     r3   )paramsidsc                    | j         S )z@
    Fixture for returning the axis numbers of a DataFrame.
    paramrequests    r1   axisr         
 =r3   )r   c                    | j         S )a  
    Pass in the observed keyword to groupby for [True, False]
    This indicates whether categoricals should return values for
    values which are not in the grouper [False / None], or only values which
    appear in the grouper [True]. [None] is supported for future compatibility
    if we decide to change the default (and would need to warn if this
    parameter is not passed).
    r   r   s    r1   observedr          =r3   )TFNc                    | j         S )z6
    Boolean 'ordered' parameter for Categorical.
    r   r   s    r1   orderedr   +  r   r3   c                    | j         S )z%
    Boolean 'dropna' parameter.
    r   r   s    r1   dropnar   3  r   r3   c                    | j         S )z#
    Boolean 'sort' parameter.
    r   r   s    r1   sortr   ;  r   r3   c                    | j         S )z%
    Boolean 'skipna' parameter.
    r   r   s    r1   skipnar   C  r   r3   )firstlastFc                    | j         S )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    r   r   s    r1   keepr   K       =r3   )bothneitherleftrightc                    | j         S )zA
    Fixture for trying all interval 'inclusive' parameters.
    r   r   s    r1   inclusive_endpoints_fixturer   T  r   r3   )r   r   r   r   c                    | j         S )z<
    Fixture for trying all interval closed parameters.
    r   r   s    r1   closedr   \  r   r3   c                    | j         S )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    r   r   s    r1   other_closedr   d  r   r3   gzipbz2zipxztarzstd	zstandard)marksc                    | j         S )zK
    Fixture for trying common compression types in compression tests.
    r   r   s    r1   compressionr   l       =r3   c                    | j         S )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    r   r   s    r1   compression_onlyr   ~  r   r3   c                    | j         S )z,
    Fixture that an array is writable.
    r   r   s    r1   writabler     r   r3   )innerouterr   r   c                    | j         S )z:
    Fixture for trying all types of join operations.
    r   r   s    r1   	join_typer     r   r3   nlargest	nsmallestc                    | j         S )z1
    Fixture for trying all nselect methods.
    r   r   s    r1   nselect_methodr     r   r3   c                    | j         S )z2
    Fixture for 'na_action' argument in map.
    r   r   s    r1   	na_actionr     r   r3   c                    | j         S )zJ
    Fixture for 'na_action' argument in sort_values/sort_index/rank.
    r   r   s    r1   	ascendingr     r   r3   )averageminmaxr   densec                    | j         S )z.
    Fixture for 'rank' argument in rank.
    r   r   s    r1   rank_methodr     r   r3   c                    | j         S )z5
    Fixture for 'as_index' argument in groupby.
    r   r   s    r1   as_indexr     r   r3   c                    | j         S )z6
    Fixture for 'cache' argument in to_datetime.
    r   r   s    r1   cacher     r   r3   c                    | j         S )z>
    Fixture for parallel keyword argument for numba.jit.
    r   r   s    r1   parallelr     r   r3   c                    | j         S )z;
    Fixture for nogil keyword argument for numba.jit.
    r   r   s    r1   nogilr     r   r3   c                    | j         S )z>
    Fixture for nopython keyword argument for numba.jit.
    r   r   s    r1   nopythonr     r   r3   c                *    t          |           j        S Ntype__name__r   s    r1   r   r     s    d1gg6F r3   c                    | j         S )z/
    Fixture for each null type in pandas.
    r   r   s    r1   nulls_fixturer     r   r3   c                    | j         S )zL
    Fixture for each null type in pandas, each null type exactly once.
    r   r   s    r1   unique_nulls_fixturer     r   r3   c                *    t          |           j        S r   r   r   s    r1   r   r     s    Q8H r3   c                    | j         S )z-
    Fixture for each NaT type in numpy.
    r   r   s    r1   np_nat_fixturer     r   r3   c                    | j         S )z;
    Fixture to parametrize over DataFrame and Series.
    r   r   s    r1   frame_or_seriesr     r   r3   r   seriesc                    | j         S )z
    Fixture to parametrize over Index and Series, made necessary by a mypy
    bug, giving an error:

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

    See GH#29725
    r   r   s    r1   index_or_seriesr     r   r3   )r   r   arrayc                    | j         S )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    r   r   s    r1   index_or_series_or_arrayr   ,  r   r3   c                    | j         S r   )r   r   s    r1   r   r   4  s    1: r3   c                    | j         S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    r   r   s    r1   box_with_arrayr   4  r   r3   
type[dict]c                 ,     G d dt                     } | S )z,
    Fixture for a dictionary subclass.
    c                      e Zd ZddZdS )"dict_subclass.<locals>.TestSubDictr(   r)   c                0    t          j        | g|R i | d S r   )dict__init__)r9   argskwargss      r1   r   z+dict_subclass.<locals>.TestSubDict.__init__G  s(    M$000000000r3   Nr(   r)   )r   
__module__r8   r   r   r3   r1   TestSubDictr   F  s(        	1 	1 	1 	1 	1 	1r3   r   )r   )r   s    r1   dict_subclassr   @  s4    1 1 1 1 1d 1 1 1 r3   type[abc.Mapping]c                 6     G d dt           j                  } | S )z8
    Fixture for a non-mapping dictionary subclass.
    c                  ,    e Zd Zd
dZd ZddZddZd	S )5non_dict_mapping_subclass.<locals>.TestNonDictMappingr(   r)   c                    || _         d S r   )_data)r9   underlying_dicts     r1   r   z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__T  s    (DJJJr3   c                6    | j                             |          S r   )r   __getitem__)r9   keys     r1   r  zAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__W  s    :))#...r3   r$   c                4    | j                                         S r   )r   __iter__r9   s    r1   r  z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Z  s    :&&(((r3   intc                4    | j                                         S r   )r   __len__r  s    r1   r	  z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__]  s    :%%'''r3   Nr   )r(   r$   )r(   r  )r   r   r8   r   r  r  r	  r   r3   r1   TestNonDictMappingr   S  s_        	) 	) 	) 	)	/ 	/ 	/	) 	) 	) 	)	( 	( 	( 	( 	( 	(r3   r
  )r   Mapping)r
  s    r1   non_dict_mapping_subclassr  M  s6    ( ( ( ( (S[ ( ( ( r3   c            	        t          t          j                            d                              d          t          t          d                    t          ddd                    } |                     d	 d
 d g          	                                }|j
                            d |j
        j        D                       |_
        |j
                            g dd           |S )z
    DataFrame with 3 level MultiIndex (year, month, day) covering
    first 100 business days from 2000-01-01 with random data
       )d      ABCD
2000-01-01r  Bperiodsfreq)r   r   c                    | j         S r   )yearr   s    r1   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s     r3   c                    | j         S r   )rs   r   s    r1   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s    17 r3   c                    | j         S r   )dayr   s    r1   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s    ae r3   c                8    g | ]}|                     d           S )i8)astype).0levs     r1   
<listcomp>zCmultiindex_year_month_day_dataframe_random_data.<locals>.<listcomp>s  s$    %S%S%S3cjj&6&6%S%S%Sr3   )r  rs   r  T)inplace)r   rx   randomdefault_rngstandard_normalr    listr   groupbysumr   
set_levelslevels	set_names)tdfymds     r1   /multiindex_year_month_day_dataframe_random_datar.  f  s     
	a  00::d6ll##s===  C
 ++''):):OOL
M
M
Q
Q
S
SC	$$%S%S#)BR%S%S%STTCII000$???Jr3   r!   c                 B    t          g dg dgg dg dgddg          S )z;
    2-level MultiIndex, lexsorted, with string names.
    foobarbazquxonetwothree)
r   r   r   ro   ro   r  r     r9  r9  )
r   ro   r  r   ro   ro   r  r   ro   r  r   second)r*  codesnames)r!   r   r3   r1   %lexsorted_two_level_string_multiindexr=  x  sM    
 ,,,.E.E.EF---/M/M/MN!   r3   r   c                    | }t          t          j                            d                              d          |t          g dd                    S )z2DataFrame with 2 level MultiIndex with random datar  )
   r9  )Ar  CexprI   r   r   )r   rx   r#  r$  r%  r    )r=  r   s     r1    multiindex_dataframe_random_datarE    sX    
 2E
	a  0099oooE222   r3   c                     t          g d          } t          ddg          }t          j        g d          }t          j        g d          }ddg}t          | |g||g|d	          S )
zJ
    MultiIndex used to test the general functionality of this object
    r0  r6  r7  )r   r   ro   r  r9  r9  )r   ro   r   ro   r   ro   r   r:  F)r*  r;  r<  verify_integrity)r    rx   r   r!   )
major_axis
minor_axismajor_codesminor_codesindex_namess        r1   _create_multiindexrM    s     33344Ju~&&J(---..K(---..KH%KJ'K(	   r3   c            	     `    t          j        ddgddgt          ddd          gg d	
          S )zB
    MultiIndex with a level that is a tzaware DatetimeIndex.
    ro   r  ab20130101r9  
US/Easternr  tzr5  )r<  )r!   from_productr   r   r3   r1   _create_mi_with_dt64tz_levelrV    sH    
 "
Q#sZ
A,OOOP%%%   r3   r;   c                    g | ]}d | S pandas_r   r  is     r1   r!  r!        666q]q]]666r3   r?  dtypestringc                    g | ]}d | S rX  r   rZ  s     r1   r!  r!    r\  r3   r   z
2020-01-01)r  zdatetime-tzz
US/PacificrS  periodDr  r   z1 day)startr  r  rangeint8int16int32int64uint8uint16uint32uint64float32float64zbool-object
bool-dtype	complex64y              ?
complex128categoricalabcdr  intervalr     )numemptytuples)r1  r2  r3  )ro   r  r9  )strictmi-with-dt64tz-levelmultirepeats)r   r   ro   ro   r  r  nullable_intInt64nullable_uintUInt16nullable_floatFloat32nullable_boolbooleanzstring-pythonc                    g | ]}d | S rX  r   rZ  s     r1   r!  r!    s    333A-A--333r3   zstring[python]c                    g | ]}d | S rX  r   rZ  s     r1   r!  r!    s    ;;;A-A--;;;r3   zstring[pyarrow]zstring-pyarrowc                N    t           | j                                     d          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
        - ...
    Fdeep)indices_dictr   copyr   s    r1   r   r     s"     &+++777r3   c                B    g | ]\  }}t          |t                    |S r   )
isinstancer!   r  r  values      r1   r!  r!    s;       U*UJ:W:W  r3   c                R    | j         }t          |                             d          S )z8
    index fixture, but excluding MultiIndex cases.
    Fr  )r   r  r  )r   r  s     r1   
index_flatr    s'     -C!!u!---r3   c                t    g | ]5\  }}|                     d           s|dv t          |t                    3|6S ))r  uintfloat)rd  rw  r|  ro  )
startswithr  r!   r  s      r1   r!  r!    s_       CNN344	
 AAA5*-- B	 	 BAAr3   c                ^   t           | j                 }| j        dv rV|                                }dg|d         dd         R |d<   dg|d         dd         R |d<   t          j        |          S |j                                        }d|d<   d|d<    t          |          |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.
    )rx  rz  r{  Nr   ro   F)r  )r  r   tolistr!   from_tuplesvaluesr  r   )r   indvalss      r1   index_with_missingr    s    ( w}
%C}CCCzz||&$q'!""+&&Q(48ABB<((R%d+++z  QRtCyyE****r3   r   c            	         t          t          j        dt          j                  dz  t	          d t          d          D                       d          S )zC
    Fixture for Series of floats with Index of unique strings
       r]  g?c                    g | ]}d | S )i_r   rZ  s     r1   r!  z!string_series.<locals>.<listcomp>(  s    111!X!XX111r3   r   r   rI   )r   rx   arangern  r    rd  r   r3   r1   string_seriesr  !  sW    
 
	"BJ'''#-11uRyy11122   r3   c                     d t          d          D             } t          d t          d          D                       }t          | |dt                    S )zI
    Fixture for Series of dtype object with Index of unique strings
    c                    g | ]}d | S foo_r   rZ  s     r1   r!  z!object_series.<locals>.<listcomp>2  s    ***1J1JJ***r3   r  c                    g | ]}d | S )bar_r   rZ  s     r1   r!  z!object_series.<locals>.<listcomp>3  s    111!:!::111r3   objectsr   rI   r^  )rd  r    r   r;   )datar   s     r1   object_seriesr  -  sV    
 +*b		***D11uRyy11122E$e)6BBBBr3   c                     t          t          j                            d                              d          t          ddd          d          S )z9
    Fixture for Series of floats with DatetimeIndex
    r  r  r  r  r  tsr  )r   rx   r#  r$  r%  r   r   r3   r1   datetime_seriesr  7  sQ    
 
	a  0044r<<<   r3   c                    t          |           }t          j                            d                              |          }t          || dd          S )zHelper for the _series dictr  rO  F)r   rI   r  )lenrx   r#  r$  r%  r   )r   sizer  s      r1   _create_seriesr  C  sG    u::D9  ##33D99D$e#E::::r3   c                <    i | ]\  }}d | dt          |          S )zseries-with-z-indexr  )r  index_idr   s      r1   
<dictcomp>r  J  sA       % $8###^E%:%:  r3   c                     t          |           S )zE
    Fixture for tests on series with changing types of indices.
    r  r   s    r1   series_with_simple_indexr  P  s    
 %   r3   c           
         i | ]B}|j          d t          t          d          d t          d          D             d|          CS )-seriesr  c                    g | ]}d | S )zi-r   rZ  s     r1   r!  z<dictcomp>.<listcomp>Z  s    666q(q((666r3   rO  r  )r   r   rd  r  r^  s     r1   r  r  X  sj        	 ~b		66E"II666S! ! !  r3   c                N    t           | j                                     d          S )z|
    Fixture for tests on indexes, series and series with a narrow dtype
    copy to avoid mutation, e.g. setting .name
    Fr  )_index_or_series_objsr   r  r   s    r1   index_or_series_objr  c  s"     !/44%4@@@r3   c                >    i | ]}|j          d t          |          S )r  )r   r   r  s     r1   r  r  l  s8       27u~u  r3   c                N    t           | j                                     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
    Fr  )_index_or_series_memory_objsr   r  r   s    r1   index_or_series_memory_objr  y  s"     (6;;;GGGr3   c            	         t          t          j        dt          j                  t	          d t          d          D                       t	          t          d                              S )zj
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']
    r  r  r]  c                    g | ]}d | S r  r   rZ  s     r1   r!  zint_frame.<locals>.<listcomp>      333AZAZZ333r3   r  r  rD  )r   rx   onesrh  r    rd  r&  r   r3   r1   	int_framer    s`     
rx(((33r33344d6ll##   r3   c            	        t          t          j                            d                              d          t          d t          d          D                       t          t          d                              S )zm
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    r  r  c                    g | ]}d | S r  r   rZ  s     r1   r!  zfloat_frame.<locals>.<listcomp>  r  r3   r  r  rD  )r   rx   r#  r$  r%  r    rd  r&  r   r3   r1   float_framer    sm     
	a  009933r33344d6ll##   r3   c                    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          |                     |           S )zF
    Fixture for Series with a DatetimeIndex that has duplicates.
    i  ro   r  r9  r  rn   r  )r   r   rx   r#  r$  r%  r  )datess    r1   (rand_series_with_duplicate_datetimeindexr    s     	q!q!q!q!q!q!q!q!q!q!E ")''**::3u::FFeTTTTr3   )r   r   r   g?g      ?z2012-01M)r  z	period[M]z
2012-02-01z	period[D]z
2011-01-01rR  )rT  s)unitrT  i  )secondsztimedelta64[us]c                    | j         S )z;
    Fixture that tests each scalar and datetime type.
    r   r   s    r1   ea_scalar_and_dtyper        " =r3   c                    | j         S )zD
    Fixture for dunder names for common arithmetic operations.
    r   r   s    r1   all_arithmetic_operatorsr    r   r3   c                    | j         S )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    r   r   s    r1   all_binary_operatorsr        D =r3   c                    | j         S )z
    Fixture for operator and roperator arithmetic functions.

    Notes
    -----
    This includes divmod and rdivmod, whereas all_arithmetic_operators
    does not.
    r   r   s    r1   all_arithmetic_functionsr     s    6 =r3   )countr(  r   r   meanprodstdvarmediankurtskewsemc                    | j         S )z.
    Fixture for numeric reduction names.
    r   r   s    r1   all_numeric_reductionsr  .  r   r3   allanyc                    | j         S )z.
    Fixture for boolean reduction names.
    r   r   s    r1   all_boolean_reductionsr  9  r   r3   c                    | j         S )z>
    Fixture for all (boolean + numeric) reduction names.
    r   r   s    r1   all_reductionsr  D  r   r3   c                    | j         S )z;
    Fixture for operator module comparison functions.
    r   r   s    r1   comparison_opr  L       =r3   )__le____lt____ge____gt__c                    | j         S )zm
    Fixture for dunder names for compare operations except == and !=

    * >=
    * >
    * <
    * <=
    r   r   s    r1   compare_operators_no_eq_ner  ]  r   r3   )__and____rand____or____ror____xor____rxor__c                    | j         S )zY
    Fixture for dunder names for common logical operations

    * |
    * &
    * ^
    r   r   s    r1   all_logical_operatorsr  j       =r3   )cumsumcumprodcummincummaxc                    | j         S )z0
    Fixture for numeric accumulation names
    r   r   s    r1   all_numeric_accumulationsr
  {  r   r3   c                ,    |                      d          S )zR
    Returns the configuration for the test setting `--no-strict-data-files`.
    r+   )r^   )pytestconfigs    r1   strict_data_filesr    s    
 !!":;;;r3   r  Callable[..., str]c                     t           j                            t           j                            t                    d           f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                     t          j        j        g| R  }t           j                            |          s-rt	          d| d          t          j        d| d           |S )NzCould not find file z' and --no-strict-data-files is not set.zCould not find r6   )osrE   joinexists
ValueErrorrL   skip)r   rE   	BASE_PATHr  s     r1   decozdatapath.<locals>.deco  s}    w|I----w~~d## 	3   X4XXX   K1$111222r3   )r  rE   r  dirname__file__)r  r  r  s   ` @r1   datapathr    sN    & RW__X66@@I      Kr3   UTCz
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporez+01:15z-02:15z	UTC+01:15z	UTC-02:15)hoursr  r1  rC  i,  ic                ,    g | ]}t          |          S r   )reprrZ  s     r1   r!  r!    s    +++AQ+++r3   c                    | j         S )zD
    Fixture for trying timezones including default (None): {0}
    r   r   s    r1   tz_naive_fixturer!    r   r3   c                    | j         S )z4
    Fixture for trying explicit timezones: {0}
    r   r   s    r1   tz_aware_fixturer#    r   r3   utczdateutil/UTCc                    | j         S )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    r   r   s    r1   utc_fixturer&    r   r3   )r  msusnsc                    | j         S )z&
    datetime64 units we support.
    r   r   s    r1   r  r    r   r3   c                    | j         S )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    r   r   s    r1   string_dtyper,         =r3   pythonpyarrow)string=string[python]string=string[pyarrow]string=str[pyarrow]string=str[python]c                @    | j         \  }}t          j        ||          S )z
    Parametrized fixture for string dtypes.
    * 'string[python]' (NA variant)
    * 'string[pyarrow]' (NA variant)
    * 'str' (NaN variant, with pyarrow)
    * 'str' (NaN variant, without pyarrow)
    )r   ry   StringDtyper   storagena_values      r1   string_dtype_no_objectr9    s"    0  GX>'8,,,r3   c                    | j         S )za
    Parametrized fixture for string dtypes.

    * 'string[python]'
    * 'string[pyarrow]'
    r   r   s    r1   nullable_string_dtyper;  *       =r3   c                (    t          j        | j         S )zq
    Parametrized fixture for string dtypes backed by Pyarrow.

    * 'str[pyarrow]'
    * 'string[pyarrow]'
    )ry   r5  r   r   s    r1   pyarrow_string_dtyper>  :  s     >7=))r3   c                    | j         S zb
    Parametrized fixture for pd.options.mode.string_storage.

    * 'python'
    * 'pyarrow'
    r   r   s    r1   string_storagerA  J  r<  r3   c                    | j         S )z
    Parametrized fixture for StringDtype storage and na_value.

    * 'python' + pd.NA
    * 'pyarrow' + pd.NA
    * 'pyarrow' + np.nan
    r   r   s    r1   string_dtype_argumentsrC  Z  s    , =r3   numpy_nullablec                    | j         S r@  r   r   s    r1   dtype_backendrF  s  r<  r3   c                    | j         S )zK
    Parametrized fixture for bytes dtypes.

    * bytes
    * 'bytes'
    r   r   s    r1   bytes_dtyperH         =r3   c                    | j         S )zN
    Parametrized fixture for object dtypes.

    * object
    * 'object'
    r   r   s    r1   object_dtyperK    rI  r3   )zstring=objectr0  r1  r2  r3  c                    t          | j        t          j                  r| j        S | j        \  }}t	          j        ||          S )z
    Parametrized fixture for string dtypes.
    * 'object'
    * 'string[python]' (NA variant)
    * 'string[pyarrow]' (NA variant)
    * 'str' (NaN variant, with pyarrow)
    * 'str' (NaN variant, without pyarrow)
    )r  r   rx   r^  ry   r5  r6  s      r1   any_string_dtyperM    sB    2 '-** 1} $M~gx000r3   c                    | j         S )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    r   r   s    r1   datetime64_dtyperO    rI  r3   c                    | j         S )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    r   r   s    r1   timedelta64_dtyperQ    rI  r3   r   c            	     .    t          ddddddd          S )z-
    Fixture emits fixed Timestamp.now()
    i  ro   rp   r        )r  rs   r  hourminuter:  microsecond)r   r   r3   r1   fixed_now_tsrX    s*    
 1RR   r3   c                    | j         S )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    r   r   s    r1   float_numpy_dtyperZ    r-  r3   c                    | j         S )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    r   r   s    r1   float_ea_dtyper\    rI  r3   c                    | j         S )z~
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    * 'Float32'
    * 'Float64'
    r   r   s    r1   any_float_dtyper^    r  r3   c                    | j         S )zg
    Parameterized fixture for complex dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    r   r   s    r1   complex_dtyper`    r-  r3   c                    | j         S )z
    Parameterized fixture for complex and numpy float dtypes.

    * complex
    * 'complex64'
    * 'complex128'
    * float
    * 'float32'
    * 'float64'
    r   r   s    r1   complex_or_float_dtyperb    s     =r3   c                    | j         S )z|
    Parameterized fixture for signed integer dtypes.

    * int
    * 'int8'
    * 'int16'
    * 'int32'
    * 'int64'
    r   r   s    r1   any_signed_int_numpy_dtyperd  #  r  r3   c                    | j         S )zx
    Parameterized fixture for unsigned integer dtypes.

    * 'uint8'
    * 'uint16'
    * 'uint32'
    * 'uint64'
    r   r   s    r1   any_unsigned_int_numpy_dtyperf  1  r   r3   c                    | j         S )z
    Parameterized fixture for any integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    r   r   s    r1   any_int_numpy_dtyperh  >  r   r3   c                    | j         S )z
    Parameterized fixture for any nullable integer dtype.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    r   r   s    r1   any_int_ea_dtyperj  P  r  r3   c                    | j         S )a.  
    Parameterized fixture for any nullable integer dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    r   r   s    r1   any_int_dtyperl  a  s    . =r3   c                    | j         S )z
    Parameterized fixture for any nullable integer dtype and
    any float ea dtypes.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    r   r   s    r1   any_numeric_ea_dtypern  {  r  r3   c                    | j         S )a  
    Parameterized fixture for any nullable integer dtype and
    any float ea dtypes.

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    * 'uint8[pyarrow]'
    * 'int8[pyarrow]'
    * 'uint16[pyarrow]'
    * 'int16[pyarrow]'
    * 'uint32[pyarrow]'
    * 'int32[pyarrow]'
    * 'uint64[pyarrow]'
    * 'int64[pyarrow]'
    * 'float32[pyarrow]'
    * 'float64[pyarrow]'
    r   r   s    r1   any_numeric_ea_and_arrow_dtyperp    s    @ =r3   c                    | j         S )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    r   r   s    r1   any_signed_int_ea_dtyperr    r   r3   c                    | j         S )z
    Parameterized fixture for any (purely) real numeric dtype.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    r   r   s    r1   any_real_numpy_dtypert    s    $ =r3   c                    | j         S )a  
    Parameterized fixture for any (purely) real numeric dtype.

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

    and associated ea dtypes.
    r   r   s    r1   any_real_numeric_dtyperv    s    ( =r3   c                    | j         S )a  
    Parameterized fixture for all numpy dtypes.

    * bool
    * 'bool'
    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    * complex
    * 'complex64'
    * 'complex128'
    * str
    * 'str'
    * 'U'
    * bytes
    * 'bytes'
    * 'datetime64[ns]'
    * 'M8[ns]'
    * 'timedelta64[ns]'
    * 'm8[ns]'
    * object
    * 'object'
    r   r   s    r1   any_numpy_dtyperx    r  r3   c                    | 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]'
    r   r   s    r1   any_real_nullable_dtyperz    s    : =r3   c                    | j         S )a  
    Parameterized fixture for all numeric dtypes.

    * int
    * 'int8'
    * 'uint8'
    * 'int16'
    * 'uint16'
    * 'int32'
    * 'uint32'
    * 'int64'
    * 'uint64'
    * float
    * 'float32'
    * 'float64'
    * complex
    * 'complex64'
    * 'complex128'
    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    * 'Float32'
    * 'Float64'
    r   r   s    r1   any_numeric_dtyper|  2  s    > =r3   rO  cmixedbytes   a   czmixed-integerg       @floatingg      ?integerzmixed-integer-floatdecimal
datetime64z
2013-01-01z
2018-01-01rQ  20180101r   i  i  complexy      ?      ?y       @       @r   c                    g | ]
}|d          S )r   r   )r  pairs     r1   r!  r!  p  s)       DG  r3   c                T    | j         \  }}t          j        |t                    }||fS )a  
    Fixture for all inferred dtypes from _libs.lib.infer_dtype

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

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

    Examples
    --------
    >>> from pandas._libs import lib
    >>>
    >>> def test_something(any_skipna_inferred_dtype):
    ...     inferred_dtype, values = any_skipna_inferred_dtype
    ...     # will pass
    ...     assert lib.infer_dtype(values, skipna=True) == inferred_dtype
    r]  )r   rx   r   r;   )r   inferred_dtyper  s      r1   any_skipna_inferred_dtyper  u  s2    R %]NFXfF+++F 6!!r3   c                     t          j        dd           ddlm}  ddlm}  |            }d|j        _         | |          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:)r`   )rL   importorskipIPython.core.interactiveshellr  traitlets.configr  HistoryManager	hist_file)r  r  r}  s      r1   ipr    sj     	g6666>>>>>> ('''''A!+A1%%%%r3   c               #    K   t          j        d          } t          j        d          }t          j        d          }|j                                        }	 |                                 5  |                     d           dV  ddd           n# 1 swxY w Y   |j                                         |j                            |           |                    d           t          j
        d           dS # |j                                         |j                            |           |                    d           t          j
        d           w xY w)a*  
    Ensure Matplotlib is cleaned up around a test.

    Before a test is run:

    1) Set the backend to "template" to avoid requiring a GUI.

    After a test is run:

    1) Reset units registry
    2) Reset rc_context
    3) Close all figures

    See matplotlib/testing/decorators.py#L24.
    
matplotlibzmatplotlib.unitszmatplotlib.pyplottemplateNr  ro   )rL   r  registryr  
rc_contextuseclearupdateclosegccollect)mpl	mpl_unitspltorig_units_registrys       r1   mpl_cleanupr    sz     " 
l
+
+C#$677I

1
2
2C#,1133	^^ 	 	GGJEEE	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	  """!!"5666		%

1	 	  """!!"5666		%

1s1   C< -BC< BC< BC< <AEc                    g | ]Y}t          t          t          j        |          t          j        j                  r |d k    ?t          t          j        |          ZS )Tick)
issubclassgetattrry   offsetsr  )r  os     r1   r!  r!    s[       gbj!,,bjo>> DE;; 	
ACN;;r3   c                    | j         S )zN
    Fixture for Tick based datetime offsets available for a time series.
    r   r   s    r1   tick_classesr    r  r3   c                    | S r   r   r   s    r1   r   r     s     r3   c                    | j         S )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    r   r   s    r1   sort_by_keyr    r   r3   )r1  NN)EgonVenkmanN)NCC1701Dr  r  #tuple[Hashable, Hashable, Hashable]c                    | j         S )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    r   r   s    r1   r<  r<    s      =r3   c                    | j         S )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    r   r   s    r1   indexer_slir    r   r3   c                    | j         S )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    r   r   s    r1   
indexer_lir    r   r3   c                    | j         S )z8
    Parametrize over __setitem__, iloc.__setitem__
    r   r   s    r1   
indexer_sir    r   r3   c                    | j         S )z7
    Parametrize over __setitem__, loc.__setitem__
    r   r   s    r1   
indexer_slr    r   r3   c                    | j         S )z:
    Parametrize over at.__setitem__, loc.__setitem__
    r   r   s    r1   
indexer_alr  &  r   r3   c                    | j         S )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    r   r   s    r1   indexer_ialr  .  r   r3   Iterator[bool | type[Warning]]c              #     K   t          j        d| j                  5  | j        rt           j        j        ndV  ddd           dS # 1 swxY w Y   dS )z
    Fixture to check if performance warnings are enabled. Either produces
    ``PerformanceWarning`` if they are enabled, otherwise ``False``.
    zmode.performance_warningsFN)ry   option_contextr   r'   PerformanceWarningr   s    r1   performance_warningr  6  s       
	6	F	F G G.5mFbi**FFFG G G G G G G G G G G G G G G G G Gs   AAAboolc                 2    t           j        j        j        du S )z=
    Fixture to check if infer string option is enabled.
    T)ry   optionsfutureinfer_stringr   r3   r1   using_infer_stringr  @  s    
 :)T11r3   c                 2    t           j        j        j        du S )NT)ry   r  r  python_scalarsr   r3   r1   using_python_scalarsr  H  s    :+t33r3   zEurope/Warsawzdateutil/Europe/Warsawz	list[Any]_warsawsc                    | j         S )zE
    tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
    r   r   s    r1   warsawr  R  r   r3   c                t    | t          t          j                              z  }|                                 |S )z
    Generate a unique file for testing use. See link for removal policy.
    https://docs.pytest.org/en/7.1.x/how-to/tmp_path.html#the-default-base-temporary-directory
    )rF   uuiduuid4touch)tmp_path	file_paths     r1   	temp_filer  Z  s2     3tz||,,,IOOr3   rA   )scopec               #     K   t           j                                        5 } | V  d d d            d S # 1 swxY w Y   d S r   )rL   MonkeyPatchcontext)mps    r1   monkeysessionr  e  s      			#	#	%	%                  s   377c              #  ~   K   | j         }t          j        d|           5  |V  d d d            d S # 1 swxY w Y   d S )Nzfuture.distinguish_nan_and_na)r   ry   r  )r   opts     r1   using_nan_is_nar  k  s      
-C		:G	D	D  			                 s   266r   )rC   rD   rE   rF   rG   rF   r(   r)   )r(   r   )r(   r   )r(   r!   )r(   r   )r(   r   )r  rF   r(   r  )r(   r   )r(   r  )r(   r  )r(   r  )r(   rF   (B  __doc__
__future__r   collectionsr   r   r   r   r   r	   r  r
   r  operatorr  typingr   r   r  dateutil.tzr   r   
hypothesisr   stnumpyrx   rL   pandas.compat._optionalr   pandas.util._test_decoratorsutil_test_decoratorstdpandas.core.dtypes.dtypesr   r   pandasry   r   r   r   r   r   r   r   r   r   r   r   r   pandas._testing_testingtmpandas.corer   pandas.core.indexes.apir    r!   collections.abcr"   r#   r$   r/  pahas_pyarrowImportErrorr%   r2   rB   rO   rc   settingsregister_profileHealthChecktoo_slowdiffering_executorsload_profilesplitrI   r  tseriesr  clsregister_type_strategybuildsintegersbooleansfixturer{   r   r   r   r   r   r   r   r   r   r   r   r   
skip_if_nor   r   r   r   r   r   r   r   r   r   r   r   r   NULL_OBJECTSr   nulls_fixture2nanNaTr   unique_nulls_fixture2NP_NAT_OBJECTSr   np_nat_fixture2r   r   r   r   r   box_with_array2r   r  r.  r=  rE  rM  rV  rd  r;   r  r  r&  from_breakslinspacer  r   r  r  idxkeysr   r_   r  r  r  r  r  r  _seriesr  NARROW_NP_DTYPES_narrow_seriesr  r  PYTHON_DATA_TYPES_typ_objects_seriesr  r  r  r  r  as_unitr  arithmetic_dunder_methodsr  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_r  r  _all_numeric_reductionsr  _all_boolean_reductionsr  _all_reductionsr  r  r  r  _all_numeric_accumulationsr
  r  r  r$  	TIMEZONESextendFixedOffsetTIMEZONE_IDSparametrize_fixture_docrF   r!  r#  _UTCSappendr&  utc_fixture2r  unit2STRING_DTYPESr,  NAr9  r;  r>  rA  rC  rF  string_storage2string_dtype_arguments2BYTES_DTYPESrH  OBJECT_DTYPESrK  r^  rM  any_string_dtype2DATETIME64_DTYPESrO  TIMEDELTA64_DTYPESrQ  rX  FLOAT_NUMPY_DTYPESrZ  FLOAT_EA_DTYPESr\  ALL_FLOAT_DTYPESr^  COMPLEX_DTYPESr`  COMPLEX_FLOAT_DTYPESrb  SIGNED_INT_NUMPY_DTYPESrd  UNSIGNED_INT_NUMPY_DTYPESrf  ALL_INT_NUMPY_DTYPESrh  ALL_INT_EA_DTYPESrj  ALL_INT_DTYPESrl  rn  ALL_INT_PYARROW_DTYPES_STR_REPRFLOAT_PYARROW_DTYPES_STR_REPRrp  SIGNED_INT_EA_DTYPESrr  ALL_REAL_NUMPY_DTYPESrt  ALL_REAL_DTYPESrv  ALL_NUMPY_DTYPESrx  ALL_REAL_NULLABLE_DTYPESrz  ALL_NUMERIC_DTYPESr|  r  _any_skipna_inferred_dtyper   r  r  r  __all__r  r  r<  setitemlocilocr  r  r  r  atr  iatr  r  r  r  r  __annotations__r  r  r  r  r   r3   r1   <module>rj     s*    ( # " " " " "                          				  				                    ' ' ' ' ' '      > > > > > > ) ) ) ) ) ) ) ) )       
                                                  
            	KK	    KKK "!&:::   6 6 6,I I I I$1< 1< 1< 1<l   $ $'2 % 	 	 	       - - - 8==??  D
'"*$d
+
+CBYRYskbk#r22kbkmmLLL    499;; 
 
D
'"*$d
+
+CB	bk"a  !bkmm"+R888		
 	
 	
    @EEGG 
 
D
'"*$d
+
+CB	bk#r""!bkmm%"+R@@@		
 	
 	
   $ ! ! ! ! 1 1 1 1 1117N7NOOO  PO e}%%%	 	 &%	 ***+++  ,+ e}%%%  &% e}%%%  &% e}%%%  &% ///000  10 ;;;<<<  =< ;;;<<<  =< ;;;<<<  =< V=2=#=#=>>>
 
 
 
 
 V=2=#=#=>>>	 	 	 	 	 e}%%%  &% :::;;;  <; 
K0111  21 h'(((  )( e}%%%  &% BBBCCC  DC e}%%%  &% e}%%%  &% e}%%%  &% w    v   r,F,FGGG  HG  bfbf-...  /. -  r(.H.HIII  JI ! 	6*+++  ,+ vWh,?@@@	 	 A@	 vrx06R6R6RSSS  TS vy"(;AUAUVVV  WV ! 	 	 	 	    0   "     	 	 	 	  (  *ee66EE"II666fEEE*ee66EE"II666eDDD* 

<444* ::lB<HHH	*
 ll<#>>>* wEEE* ZZ^^* EE)")B--v...* UU929R==000* UU929R==000* UU929R==000* UU929R==000* eeIBIbMM222* eeIBIbMM222* eeIBIbMM222*  uuYRYr]])444!*" uuYRYr]])444#* *$ 55$*&999%*& %%u)666'*( 	"K(((4)")Bk2R2R2R+RR )*. %%	"L)))D929R|3T3T3T,TT /*4 ##DDLL1$4555*6 ))+"+a"*E*E*EFF7*8 UU2YY9*: $j$!!!999T::: ;*@ 88::A*B !!C*D uu'''((E*F EE)")B--w777G*H UU929R==999I*J eeIBIbMM;;;K*L UU929R==//55YGGGM*N UU33r333;KLLL O* *V  )
%;;r;;;CTUUU
V
VC%(L!" |((**+++8 8 ,+8  *0022    
. . 
.  &,,..  
 
 
+ +
 
+4     C C C C    ; ; ; '--//   ! ! ! !  $	   F<E7EnE  ,1133444A A 54A ;=;O   
      	   388::;;;H H <;H 
 
 
 
 
 
 
 
 U U U U. 	q	"	"	"MM'7$C$CD	s#	&	&	&i(I(IJ			$	$	$k2	3	'	'	'5Il|444<<SAAO666	
 
3			!23
     r3444  54 	5  < = <   $	 	% $	     .///  0/ !%.  .///  0/ *,CC '''  (' 	 	 	 	 	 ???@@@	 	 A@	 NNN     GFF  1222  32 < < <    J 			EGGGIILHYYQ  HYYR   u---	" S!!QT""MM,''MM%  	
   ,++++ CC--..yl333  43 /. CCQRR 01122y},qrr*:;;;  <; 32 
6	LL u    ...///  0/ 	 r'(((  )( 	25i'}r}Y/G/GHHHi(i0H0HIII	26		 	 	  - - - &mbmI.F.FGGG     i(i0H0HIIIi'}r}Y/G/GHHH  * * * YmbmI&>&>???     	25i'}r}Y/G/GHHHi(i0H0HIII	26		 	 	     YmbmI&>&>???     !0  r'''  (' r'(((  )( 	25i'}r}Y/G/GHHHi(i0H0HIII	26	 	 	   1 1!  1$ %  r+,,,  -, r,---  .-     r,---  .- r)***  +* r*+++
 
 ,+
 r()))  *) r.///  0/ r1222
 
 32
 r3444	 	 54	 r.///  0/" r+,,,  -,  r()))  *)2 r+b.@@AAA  BA* () 	&'    : r.///	 	 0/	 r/000  10( r)***  +*, r*+++! ! ,+!H r2333  43> r,---  .-F RVS!"RUC !sBFC !tRVT"#rvrvrv&'bMsBFA&'sBFC !#rvs#$BFAQ,-RVWWQZZ01rvu%&rue$%MBM,//|9T9TUV))J'':1F1FGHdd4AT1a(8(89:() 99Q<<167dd1ggrvttAww'(tbfffTll34((1a.."&((1a..9:3 6 2  
 1s;;;," ," <;,"d & & &$   @  #       kk*+++  ,+ !,	 			ru	      
BFBG4555  65 ()))  *) 
BG,---  .- 
BF+,,,  -, rv'''  (' ()))  *) e}%%%G G G &%G 2 2 2 2 4 4 4 4 '(@A A A A AOODMM/22333 x      !     i     ! 
 e}%%%  &%  s   .B6 6C ?C 