
    .i                     ?   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ZA edd      ZCdUdZDd ZEdVdZFdUdZGej                  j                  ddddej                  j                  ej                  j                  f       ej                  j                  d       dj                         D ]e  ZO ePe&j                  j                  eO      ZS ej                  eS ej                  eS ej                  dd       ej                                       g d!j                         D ]x  ZO ePe&j                  j                  eO      ZS ej                  eS ej                  eS ej                  d"d#       ej                          ej                  d$d%&      '             z d(j                         D ]x  ZO ePe&j                  j                  eO      ZS ej                  eS ej                  eS ej                  d)d*       ej                          ej                  d$d%&      +             z  ej                  d,      dUd-       ZY ej                  d,      dUd.       ZZ ej                  g d/d0 1      d2        Z[ ej                  ddg3      d4        Z\ ej                  g d53      d6        Z] ej                  ddg3      d7        Z^ ej                  ddg3      d8        Z_ ej                  ddg3      d9        Z` ej                  g d:3      d;        Za ej                  g d<3      d=        Zb ej                  g d>3      d?        Zc ej                  g d>3      d@        Zd ej                  ddAdBdCdDdE ej                  dF e!j                  dG      H      g3      dI        Zg ej                  dAdBdCdDdE ej                  dF e!j                  dG      H      g3      dJ        Zh ej                  ddg3      dK        Zi ej                  g dL3      dM        Zj ej                  dNdOg3      dP        Zk ej                  ddg3      dQ        Zl ej                  ddg3      dR        Zm ej                  g dS3      dT        Zn ej                  ddg3      dU        Zo ej                  ddg3      dV        Zp ej                  ddg3      dW        Zq ej                  dg3      dX        Zr ej                  dg3      dY        Zs ej                  e5j                  dZ 1      d[        ZueuZv ej                  dej                  e&j                  g3      d\        ZyeyZz ej                  e5j                  d] 1      d^        Z|e|Z} ej                  e(e-g3      d_        Z~ ej                  e9e-gd`dag1      db        Z ej                  e9e-e&j                   gg dc1      dd        Z ej                  e9e-e(e&j                   gde 1      df        ZeZej                  dWdg       Zej                  dXdh       Zej                  di        Zej                  dYdj       Zej                  	 	 dZdk       Zdl Zdm Zi dn e9 edo      D  cg c]  } dp|  	 c} eq      dr e9 edo      D  cg c]  } dp|  	 c} dq      ds e0dtdou      dv e0dtdodwx      dy e1dtdodz{      d| e2d}dodz~      d e,do      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      i d e9ddgd#z  eq      d e9ddgd#z  eq      d e9 ej                  dodq      d ej                  dodq      z  z         d e9 ej                  dodq      d ej                  dodq      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                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      dq      d e9 ej                  do      j)                  e      dq      d e9 e&j                    edo      D  cg c]  } dp|  	 c} dq            ZeAr7 e9 e&j                    edo      D  cg c]  } dp|  	 c} dq            Zeed<    ej                  ej/                         3      d        Z ej                  ej3                         D cg c]  \  }} e|e:      r| c}}3      d        Z ej                  ej3                         D cg c]&  \  }}|j9                  d      s|dv s e|e:      s|( c}}3      d        Zej                  d[d       Zej                  d[d       Zej                  d[d       Zd Zej3                         D ci c]  \  }}d| d e|       c}}Zej                  d[d       Ze5jH                  D  ci c]:  }|jJ                   d e- ed       ed      D  cg c]  } d|  	 c} d|      < c} }Zi eeeZ ej                  ej/                         3      d        Ze5jR                  D ci c]  }|jJ                   d e-|       c}Zi eeeeZ ej                  ej/                         3      d        Zej                  dZd       Zej                  dZd       Zej                  d[d       Z ej                   e)dd#       e$dd«      f e)ddĬ       e$dd«      f e+ddƬǫ      df e+ddzǫ      df e/dd̬ͫ      ja                  dΫ       e#dd̬ϫ      f e.dЬѫ      dfg3      dӄ        Z ej                  e5jd                  3      dԄ        Z ej                  ejh                  e7jj                  ejl                  e7jn                  ejp                  e7jr                  ejt                  e7jv                  ejx                  e7jz                  ej|                  e7j~                  ej                  e7j                  ej                  ej                  ej                  ej                  ej                  ej                  ej                  e7j                  ej                  e7j                  ej                  e7j                  g3      dՄ        Z ej                  ejh                  e7jj                  ejl                  e7jn                  ejp                  e7jr                  ejt                  e7jv                  ejx                  e7jz                  ej|                  e7j~                  ej                  e7j                  g3      dք        Zg dעZ ej                  eЬ3      d؄        ZddgZ ej                  eҬ3      dۄ        Zeez   Z ej                  eԬ3      d܄        Z ej                  ej                  ej                  ej                  ej                  ej                  ej                  g3      d݄        Z ej                  g dޢ3      d߄        Z ej                  g d3      d        Zg dZ ej                  e٬3      d        Zej                  d        Zej                  d\d       Zdddddddddd e        e       e	j                   e	 ed$             e	 ed      d      gZeCeeސj                  eCj                  d      eCj                  d      eCj                  d      eCj                  dw      eCj                  d      f       eD  cg c]
  }  e|        c} Z e!j                   ee             ej                  ee1      d               Z e!j                   eed$d              ej                  ed$d ed$d 1      d               Zdd e       e	j                  gZeCej                  eCj                          ej                  e3      d        ZeZ ej                  g d3      d        ZeZ ej                  e5j                  3      d        Z ej                  de&j                  f ej                  de&j                  f e!j                  d      H       ej                  dej                  f e!j                  d      H      dej                  fgg d1      d        Z ej                  d ej                  d e!j                  d      H      g3      d         Z ej                   ej                  dej                  f e!j                  d      H       ej                  de&j                  f e!j                  d      H      g3      d        Z ej                  d ej                  d e!j                  d      H      g3      d        Z ej                  de&j                  f ej                  de&j                  f e!j                  d      H       ej                  dej                  f e!j                  d      H      dej                  fgg d1      d        Z ej                  d ej                  d e!j                  d      H      g3      d        ZeZeZ ej                  e5j                  3      d        Z ej                  e5j                  3      d        Z ej                   ej                  dn      de&j                  f ej                  de&j                  f e!j                  d      H       ej                  dej                  f e!j                  d      H      dej                  fgg d1      d	        ZeZ ej                  e5j                  3      d
        Z  ej                  e5j                  3      d        Zej                  d]d       Z ej                  e5j                  3      d        Z ej                  e5j                  3      d        Z ej                  e5j                  3      d        Z	 ej                  e5j                  3      d        Z ej                  e5j                  3      d        Z ej                  e5j                  3      d        Z ej                  e5j                   3      d        Z ej                  e5j$                  3      d        Z ej                  e5j(                  3      d        Z ej                  e5j,                  3      d        Z ej                  e5j(                  e5j                  z   3      d        Z ej                  e5j(                  e5j                  z   e5j2                  z   e5j4                  z   3      d        Z ej                  e5j8                  3      d        Z ej                  e5j<                  3      d        Z ej                  e5j@                  3      d        Z! ej                  e5jD                  3      d        Z# ej                  e5jH                  3      d        Z% ej                  e5jL                  3      d        Z'drdej                  dgfdrde&j                  dgfd de&j                  dgfd!d"ej                  d#gfdej                  ej                  ej                  gfdg fd$dej                  dgfd dej                  d%gfd&d'ej                  d%gfd(d$ej                  dgfd)d$ej                  d%gfd* ed$      ej                   ed      gfddej                  dgfdde&j                  dgfd+ ejP                  d,      ej                   ejP                  d-      gfds e/d.      ej                   e/d/      gfd0 ed1d$d$      ej                   ed2d$d$      gfd3d4ej                  d5gfd| ed$      ej                   ed      gfd6 ed$      ej                   ed      gfdy e+d1      e&j                   e+d2      gfd e)dd$      ej                   e)dd      gfgZ)e)D cg c]  }|d   	 c}Z* ej                  e)e*1      d7        Z+ej                  d8        Z,ej                  d9        Z- ej                  e&j                  j\                  D cg c]K  } e/ ePe&j                  |      e&j                  j`                        r|d:k7  r ePe&j                  |      M c}3      d;        Z1 ej                  dd< g3      d=        Z2 ej                  d>d?d@ej                  ej                  ej                  fej                  e&j                  dfej                  e&j                  dfe&j                  e&j                  e&j                  fg3      d^dA       Z3 ej                  e5jh                  e5jj                  e5jl                  g3      dB        Z7 ej                  e5jj                  e5jl                  g3      dC        Z8 ej                  e5jh                  e5jl                  g3      dD        Z9 ej                  e5jh                  e5jj                  g3      dE        Z: ej                  e5jv                  e5jj                  g3      dF        Z< ej                  e5jz                  e5jl                  g3      dG        Z> ej                  ddg3      d_dH       Z?ej                  d`dI       Z@ej                  d`dJ       ZAdKdLgZBdMeCdN<   eC#eBj                  eCj                  dK              ej                  eB3      dadO       ZDej                  dP        ZE ej                  dQR      dS        ZF ej                  ddg3      dT        ZGy# eB$ r dZAY w xY wc c} w c c} w c c} w c c} w c c}}w c c}}w c c}}w c c} w c c} }w c c}w c c} w c c}w c c}w (b  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)errorsc                ,    | j                  ddd       y )N--no-strict-data-filesstore_falsez6Don't fail if a test is skipped for missing data file.)actionhelp)	addoption)parsers    M/var/www/app/trading-bot/venv/lib/python3.12/site-packages/pandas/conftest.pypytest_addoptionr0   h   s    
 E      c                r    dd l }dd l|j                  j                  fd}||j                  _        y )Nr   c                X    j                  |      rd|j                  v ry | ||      S )N.T)
isfunction__qualname__)selfmoduleobjectinspectorigs      r/   _from_modulez)pytest_sessionstart.<locals>._from_modulez   s2    f%#1D1D*D D&&))r1   )doctestr:   DocTestFinderr<   )sessionr=   r<   r:   r;   s      @@r/   pytest_sessionstartr@   p   s1       --D* *6G&r1   strc                    | j                   j                  |      r2| j                  t        j                  j                  d|              yy)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)itempathmessages      r/   ignore_doctest_warningrL      s=     yy$22WWI3FGH  r1   c                    |j                  d      xs |j                  dd      }g d}|r| D ]  }|D ]  \  }}t        |||         y y )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__rO   )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.idxminrW   )zSeriesGroupBy.idxmaxrX   )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)rV   z3DataFrameGroupBy.fillna with 'method' is deprecated)read_parquetz1Passing a BlockManager to DataFrame is deprecated)	getoptionrL   )itemsconfig
is_doctestignored_doctest_warningsrI   rJ   rK   s          r/   pytest_collection_modifyitemsr`      sq    !!"56 &:J:JE ;K ;J% N  	<D!9 <g&tT7;<	< r1   	pandas_ci   )databasedeadlinemax_examplessuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndic   )n	normalizez%YearBegin YearEnd BYearBegin BYearEnd         )	min_value	max_value)rh   ri   monthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndi   )rh   ri   startingMonth)autousec                (    t         | d<   t        | d<   y)z:
    Make `np` and `pd` names available for doctests.
    nppdN)ru   rv   )doctest_namespaces    r/   add_doctest_importsrx     s    
 !d dr1   c                 0    t        j                  dd       y)z<
    Configure settings for all tests and test modules.
    chained_assignmentraiseN)rv   
set_option r1   r/   configure_testsr~     s    
 MM&0r1   )r   rl   indexcolumnsc                    d| S )Nzaxis=r}   xs    r/   <lambda>r     s    5 r1   )paramsidsc                    | j                   S )z@
    Fixture for returning the axis numbers of a DataFrame.
    paramrequests    r/   axisr         
 ==r1   )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    r/   observedr          ==r1   )TFNc                    | j                   S )z6
    Boolean 'ordered' parameter for Categorical.
    r   r   s    r/   orderedr   +  r   r1   c                    | j                   S )z%
    Boolean 'dropna' parameter.
    r   r   s    r/   dropnar   3  r   r1   c                    | j                   S )z#
    Boolean 'sort' parameter.
    r   r   s    r/   sortr   ;  r   r1   c                    | j                   S )z%
    Boolean 'skipna' parameter.
    r   r   s    r/   skipnar   C  r   r1   )firstlastFc                    | j                   S )z[
    Valid values for the 'keep' parameter used in
    .duplicated or .drop_duplicates
    r   r   s    r/   keepr   K       ==r1   )bothneitherleftrightc                    | j                   S )zA
    Fixture for trying all interval 'inclusive' parameters.
    r   r   s    r/   inclusive_endpoints_fixturer   T  r   r1   )r   r   r   r   c                    | j                   S )z<
    Fixture for trying all interval closed parameters.
    r   r   s    r/   closedr   \  r   r1   c                    | j                   S )zS
    Secondary closed fixture to allow parametrizing over all pairs of closed.
    r   r   s    r/   other_closedr   d  r   r1   gzipbz2zipxztarzstd	zstandard)marksc                    | j                   S )zK
    Fixture for trying common compression types in compression tests.
    r   r   s    r/   compressionr   l       ==r1   c                    | j                   S )zk
    Fixture for trying common compression types in compression tests excluding
    uncompressed case.
    r   r   s    r/   compression_onlyr   ~  r   r1   c                    | j                   S )z,
    Fixture that an array is writable.
    r   r   s    r/   writabler     r   r1   )innerouterr   r   c                    | j                   S )z:
    Fixture for trying all types of join operations.
    r   r   s    r/   	join_typer     r   r1   nlargest	nsmallestc                    | j                   S )z1
    Fixture for trying all nselect methods.
    r   r   s    r/   nselect_methodr     r   r1   c                    | j                   S )z2
    Fixture for 'na_action' argument in map.
    r   r   s    r/   	na_actionr     r   r1   c                    | j                   S )zJ
    Fixture for 'na_action' argument in sort_values/sort_index/rank.
    r   r   s    r/   	ascendingr     r   r1   )averageminmaxr   densec                    | j                   S )z.
    Fixture for 'rank' argument in rank.
    r   r   s    r/   rank_methodr     r   r1   c                    | j                   S )z5
    Fixture for 'as_index' argument in groupby.
    r   r   s    r/   as_indexr     r   r1   c                    | j                   S )z6
    Fixture for 'cache' argument in to_datetime.
    r   r   s    r/   cacher     r   r1   c                    | j                   S )z>
    Fixture for parallel keyword argument for numba.jit.
    r   r   s    r/   parallelr     r   r1   c                    | j                   S )z;
    Fixture for nogil keyword argument for numba.jit.
    r   r   s    r/   nogilr     r   r1   c                    | j                   S )z>
    Fixture for nopython keyword argument for numba.jit.
    r   r   s    r/   nopythonr     r   r1   c                ,    t        |       j                  S Ntype__name__r   s    r/   r   r     s    d1g6F6F r1   c                    | j                   S )z/
    Fixture for each null type in pandas.
    r   r   s    r/   nulls_fixturer     r   r1   c                    | j                   S )zL
    Fixture for each null type in pandas, each null type exactly once.
    r   r   s    r/   unique_nulls_fixturer     r   r1   c                ,    t        |       j                  S r   r   r   s    r/   r   r     s    Q8H8H r1   c                    | j                   S )z-
    Fixture for each NaT type in numpy.
    r   r   s    r/   np_nat_fixturer     r   r1   c                    | j                   S )z;
    Fixture to parametrize over DataFrame and Series.
    r   r   s    r/   frame_or_seriesr     r   r1   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    r/   index_or_seriesr     r   r1   )r   r   arrayc                    | j                   S )zG
    Fixture to parametrize over Index, Series, and ExtensionArray
    r   r   s    r/   index_or_series_or_arrayr   ,  r   r1   c                    | j                   S r   )r   r   s    r/   r   r   4  s
    1:: r1   c                    | j                   S )z]
    Fixture to test behavior for Index, Series, DataFrame, and pandas Array
    classes
    r   r   s    r/   box_with_arrayr   4  r   r1   c                 $     G d dt               } | S )z,
    Fixture for a dictionary subclass.
    c                      e Zd ZddZy)"dict_subclass.<locals>.TestSubDictc                6    t        j                  | g|i | y r   )dict__init__)r7   argskwargss      r/   r   z+dict_subclass.<locals>.TestSubDict.__init__G  s    MM$000r1   NreturnNone)r   
__module__r6   r   r}   r1   r/   TestSubDictr   F  s    	1r1   r   )r   )r   s    r/   dict_subclassr   @  s    1d 1 r1   c                 8     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y)	5non_dict_mapping_subclass.<locals>.TestNonDictMappingc                    || _         y r   )_data)r7   underlying_dicts     r/   r   z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__T  s	    (DJr1   c                8    | j                   j                  |      S r   )r   __getitem__)r7   keys     r/   r   zAnon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__W  s    ::))#..r1   c                6    | j                   j                         S r   )r   __iter__r7   s    r/   r  z>non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Z  s    ::&&((r1   c                6    | j                   j                         S r   )r   __len__r  s    r/   r  z=non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__]  s    ::%%''r1   Nr   )r   r$   )r   int)r   r   r6   r   r   r  r  r}   r1   r/   TestNonDictMappingr   S  s    	)	/	)	(r1   r  )r   Mapping)r  s    r/   non_dict_mapping_subclassr	  M  s    (S[[ ( r1   c            	        t        t        j                  j                  d      j	                  d      t        t        d            t        ddd            } | j                  d	 d
 d g      j                         }|j                  j                  |j                  j                  D cg c]  }|j                  d       c}      |_
        |j                  j                  g dd       |S c c}w )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    r/   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s
     r1   c                    | j                   S r   )rp   r   s    r/   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s
    177 r1   c                    | j                   S r   )dayr   s    r/   r   zAmultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s
    aee r1   i8)r  rp   r  T)inplace)r   ru   randomdefault_rngstandard_normalr    listr   groupbysumr   
set_levelslevelsastype	set_names)tdfymdlevs      r/   /multiindex_year_month_day_dataframe_random_datar(  f  s     
		a 00:d6l#s=C
 ++'):OL
M
Q
Q
SC		$$#))BRBR%S3cjj&6%STCIII0$?J &Ts   +C0c                 :    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   rl   rl   r  r     r3  r3  )
r   rl   r  r   rl   rl   r  r   rl   r  r   second)r"  codesnames)r!   r}   r1   r/   %lexsorted_two_level_string_multiindexr7  x  s+    
 ,.EF-/MN! r1   c                    | }t        t        j                  j                  d      j	                  d      |t        g dd            S )z2DataFrame with 2 level MultiIndex with random datar  )
   r3  )Ar  CexprC   r   r   )r   ru   r  r  r  r    )r7  r   s     r/    multiindex_dataframe_random_datar?    s@    
 2E
		a 009oE2 r1   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
    r*  r0  r1  )r   r   rl   r  r3  r3  )r   rl   r   rl   r   rl   r   r4  F)r"  r5  r6  verify_integrity)r    ru   r   r!   )
major_axis
minor_axismajor_codesminor_codesindex_namess        r/   _create_multiindexrG    sh     34Ju~&J((-.K((-.KH%KJ'K(	 r1   c            	     Z    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.
    rl   r  ab20130101r3  
US/Easternr  tzr/  )r6  )r!   from_productr   r}   r1   r/   _create_mi_with_dt64tz_levelrP    s5    
 ""
Q#sZ
A,OP% r1   r9   r9  pandas_dtypestringr   z
2020-01-01)r  zdatetime-tzz
US/PacificrM  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)r+  r,  r-  )rl   r  r3  )strictmi-with-dt64tz-levelmultirepeats)r   r   rl   rl   r  r  nullable_intInt64nullable_uintUInt16nullable_floatFloat32nullable_boolbooleanzstring-pythonzstring[python]zstring[pyarrow]zstring-pyarrowc                H    t         | j                     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    r/   r   r     s!     &+++77r1   c                L    | j                   }t        |   j                  d      S )z8
    index fixture, but excluding MultiIndex cases.
    Frz  )r   r|  r}  )r   r   s     r/   
index_flatr    s&     --C!!u!--r1   )r  uintfloat)rX  rk  rp  rc  c                8   t         | j                     }| j                  dv rC|j                         }dg|d   dd |d<   dg|d   dd |d<   t        j                  |      S |j
                  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.
    )rl  rn  ro  Nr   rl   F)r}  )r|  r   tolistr!   from_tuplesvaluesr}  r   )r   indvalss      r/   index_with_missingr    s    ( w}}
%C}}CCzz|&$q'!"+&Q(48AB<(R%%d++zz QRtCyE**r1   c            
         t        t        j                  dt        j                        dz  t	        t        d      D  cg c]  } d|  	 c}       d      S c c} w )zC
    Fixture for Series of floats with Index of unique strings
       rR  g?i_r   r   rC   )r   ru   arangerb  r    rX  is    r/   string_seriesr  !  sK    
 
		"BJJ'#-uRy1!r!X12 1s   Ac                     t        d      D  cg c]  } d|  	 }} t        t        d      D  cg c]  } d|  	 c}       }t        ||dt              S c c} w c c} w )zI
    Fixture for Series of dtype object with Index of unique strings
    r  foo_bar_objectsr   rC   rS  )rX  r    r   r9   )r  datar   s      r/   object_seriesr  -  sY    
 !&b	*1d1#J*D*uRy1!T!:12E$e)6BB +1s
   AAc                     t        t        j                  j                  d      j	                  d      t        ddd      d      S )z9
    Fixture for Series of floats with DatetimeIndex
    r  r  r  r  r  tsr  )r   ru   r  r  r  r   r}   r1   r/   datetime_seriesr  7  s=    
 
		a 004r< r1   c                    t        |       }t        j                  j                  d      j	                  |      }t        || dd      S )zHelper for the _series dictr  rI  F)r   rC   r}  )lenru   r  r  r  r   )r   sizer  s      r/   _create_seriesr  C  s;    u:D99  #33D9D$e#E::r1   zseries-with-z-indexc                    t        |       S )zE
    Fixture for tests on series with changing types of indices.
    )r  r   s    r/   series_with_simple_indexr  P  s    
 %  r1   z-seriesr  zi-rI  r  c                H    t         | j                     j                  d      S )z|
    Fixture for tests on indexes, series and series with a narrow dtype
    copy to avoid mutation, e.g. setting .name
    Frz  )_index_or_series_objsr   r}  r   s    r/   index_or_series_objr  c  s!     !/44%4@@r1   c                H    t         | j                     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
    Frz  )_index_or_series_memory_objsr   r}  r   s    r/   index_or_series_memory_objr  y  s!     (6;;;GGr1   c            
         t        t        j                  dt        j                        t	        t        d      D  cg c]  } d|  	 c}       t	        t        d                  S c c} w )zj
    Fixture for DataFrame of ints with index of unique strings

    Columns are ['A', 'B', 'C', 'D']
    r  r  rR  r  r  r  r>  )r   ru   onesr\  r    rX  r  r  s    r/   	int_framer    sO     
rxx(r3AtA3Z34d6l# 3s   A'c            
         t        t        j                  j                  d      j	                  d      t        t        d      D  cg c]  } d|  	 c}       t        t        d                  S c c} w )zm
    Fixture for DataFrame of floats with index of unique strings

    Columns are ['A', 'B', 'C', 'D'].
    r  r  r  r  r  r>  )r   ru   r  r  r  r    rX  r  r  s    r/   float_framer    sZ     
		a 009r3AtA3Z34d6l# 3s   A0c                 z   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                  j	                  d      j                  t        |             |       S )zF
    Fixture for Series with a DatetimeIndex that has duplicates.
    i  rl   r  r3  r  rk   r  )r   r   ru   r  r  r  r  )datess    r/   (rand_series_with_duplicate_datetimeindexr    s     	q!q!q!q!q!q!q!q!q!q!E "))''*::3u:FeTTr1   )r   r   r   g?g      ?z2012-01M)r  z	period[M]z
2012-02-01z	period[D]z
2011-01-01rL  )rN  s)unitrN  i  )secondsztimedelta64[us]c                    | j                   S )z;
    Fixture that tests each scalar and datetime type.
    r   r   s    r/   ea_scalar_and_dtyper        " ==r1   c                    | j                   S )zD
    Fixture for dunder names for common arithmetic operations.
    r   r   s    r/   all_arithmetic_operatorsr    r   r1   c                    | j                   S )zU
    Fixture for operator and roperator arithmetic, comparison, and logical ops.
    r   r   s    r/   all_binary_operatorsr        D ==r1   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    r/   all_arithmetic_functionsr     s    6 ==r1   )countr   r   r   meanprodstdvarmediankurtskewsemc                    | j                   S )z.
    Fixture for numeric reduction names.
    r   r   s    r/   all_numeric_reductionsr  .  r   r1   allanyc                    | j                   S )z.
    Fixture for boolean reduction names.
    r   r   s    r/   all_boolean_reductionsr  9  r   r1   c                    | j                   S )z>
    Fixture for all (boolean + numeric) reduction names.
    r   r   s    r/   all_reductionsr  D  r   r1   c                    | j                   S )z;
    Fixture for operator module comparison functions.
    r   r   s    r/   comparison_opr  L       ==r1   )__le____lt____ge____gt__c                    | j                   S )zm
    Fixture for dunder names for compare operations except == and !=

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

    * |
    * &
    * ^
    r   r   s    r/   all_logical_operatorsr  j       ==r1   )cumsumcumprodcummincummaxc                    | j                   S )z0
    Fixture for numeric accumulation names
    r   r   s    r/   all_numeric_accumulationsr  {  r   r1   c                $    | j                  d      S )zR
    Returns the configuration for the test setting `--no-strict-data-files`.
    r)   )r[   )pytestconfigs    r/   strict_data_filesr    s    
 !!":;;r1   c                     t         j                  j                  t         j                  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|  }t         j                  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 r4   )osrJ   joinexists
ValueErrorrF   skip)r   rJ   	BASE_PATHr  s     r/   decozdatapath.<locals>.deco  sc    ww||I--ww~~d#  *4&0WX  KK/$q12r1   )r  rJ   r  dirname__file__)r  r  r  s   ` @r/   datapathr    s2    & RWW__X6@I Kr1   UTCz
Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporez+01:15z-02:15z	UTC+01:15z	UTC-02:15)hoursr  r+  r=  i,  ic                    | j                   S )zD
    Fixture for trying timezones including default (None): {0}
    r   r   s    r/   tz_naive_fixturer    r   r1   c                    | j                   S )z4
    Fixture for trying explicit timezones: {0}
    r   r   s    r/   tz_aware_fixturer    r   r1   utczdateutil/UTCc                    | j                   S )zQ
    Fixture to provide variants of UTC timezone strings and tzinfo objects.
    r   r   s    r/   utc_fixturer    r   r1   )r  msusnsc                    | j                   S )z&
    datetime64 units we support.
    r   r   s    r/   r  r    r   r1   c                    | j                   S )zR
    Parametrized fixture for string dtypes.

    * str
    * 'str'
    * 'U'
    r   r   s    r/   string_dtyper         ==r1   pythonpyarrow)string=string[python]string=string[pyarrow]string=str[pyarrow]string=str[python]c                L    | 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   rv   StringDtyper   storagena_values      r/   string_dtype_no_objectr    s#    0  GX>>'8,,r1   c                    | j                   S )za
    Parametrized fixture for string dtypes.

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

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

    * 'python'
    * 'pyarrow'
    r   r   s    r/   string_storager  J  r  r1   c                    | j                   S )z
    Parametrized fixture for StringDtype storage and na_value.

    * 'python' + pd.NA
    * 'pyarrow' + pd.NA
    * 'pyarrow' + np.nan
    r   r   s    r/   string_dtype_argumentsr  Z  s    , ==r1   numpy_nullablec                    | j                   S r  r   r   s    r/   dtype_backendr!  s  r  r1   c                    | j                   S )zK
    Parametrized fixture for bytes dtypes.

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

    * object
    * 'object'
    r   r   s    r/   object_dtyper&    r$  r1   )zstring=objectr  r  r  r  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)
    )
isinstancer   ru   rS  rv   r  r  s      r/   any_string_dtyper)    sA    2 '--*}} $MM~~gx00r1   c                    | j                   S )z\
    Parametrized fixture for datetime64 dtypes.

    * 'datetime64[ns]'
    * 'M8[ns]'
    r   r   s    r/   datetime64_dtyper+    r$  r1   c                    | j                   S )z^
    Parametrized fixture for timedelta64 dtypes.

    * 'timedelta64[ns]'
    * 'm8[ns]'
    r   r   s    r/   timedelta64_dtyper-    r$  r1   c            	     &    t        ddddddd      S )z-
    Fixture emits fixed Timestamp.now()
    i  rl   rm   r        )r  rp   r  hourminuter4  microsecond)r   r}   r1   r/   fixed_now_tsr4    s     
 1RR r1   c                    | j                   S )z^
    Parameterized fixture for float dtypes.

    * float
    * 'float32'
    * 'float64'
    r   r   s    r/   float_numpy_dtyper6    r  r1   c                    | j                   S )zR
    Parameterized fixture for float dtypes.

    * 'Float32'
    * 'Float64'
    r   r   s    r/   float_ea_dtyper8    r$  r1   c                    | j                   S )z~
    Parameterized fixture for float dtypes.

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

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

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

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

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

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

    * 'UInt8'
    * 'Int8'
    * 'UInt16'
    * 'Int16'
    * 'UInt32'
    * 'Int32'
    * 'UInt64'
    * 'Int64'
    r   r   s    r/   any_int_ea_dtyperF  P  r  r1   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    r/   any_int_dtyperH  a  s    . ==r1   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    r/   any_numeric_ea_dtyperJ  {  r  r1   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    r/   any_numeric_ea_and_arrow_dtyperL    s    @ ==r1   c                    | j                   S )z~
    Parameterized fixture for any signed nullable integer dtype.

    * 'Int8'
    * 'Int16'
    * 'Int32'
    * 'Int64'
    r   r   s    r/   any_signed_int_ea_dtyperN    r   r1   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    r/   any_real_numpy_dtyperP    s    $ ==r1   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    r/   any_real_numeric_dtyperR    s    ( ==r1   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    r/   any_numpy_dtyperT    r  r1   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    r/   any_real_nullable_dtyperV    s    : ==r1   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    r/   any_numeric_dtyperX  2  s    > ==r1   cmixedbytes   a   czmixed-integerg       @floatingg      ?integerzmixed-integer-floatdecimal
datetime64z
2013-01-01z
2018-01-01rK  20180101r   i  i  complexy      ?      ?y       @       @r   c                ^    | 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
    rR  )r   ru   r   r9   )r   inferred_dtyper  s      r/   any_skipna_inferred_dtyperf  u  s0    R %]]NFXXfF+F 6!!r1   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]   )rF   importorskipIPython.core.interactiveshellrj  traitlets.configrk  HistoryManager	hist_file)rj  rk  rY  s      r/   iprq    s<     	g6> (A!+A1%%r1   c               #    K   t        j                  d      } t        j                  d      }t        j                  d      }|j                  j                         }	 | j	                         5  | j                  d       d ddd       |j                  j                          |j                  j                  |       |j                  d       t        j                  d       y# 1 sw Y   exY w# |j                  j                          |j                  j                  |       |j                  d       t        j                  d       w xY w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  rl   )rF   rl  registryr}  
rc_contextuseclearupdateclosegccollect)mpl	mpl_unitspltorig_units_registrys       r/   mpl_cleanupr    s    " 

l
+C##$67I


1
2C#,,113	^^ 	GGJ	 	  "!!"56		%


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


1s8   AEC3 -C'C3 AE'C0,C3 3AEETickc                    | j                   S )zN
    Fixture for Tick based datetime offsets available for a time series.
    r   r   s    r/   tick_classesr    r  r1   c                    | S r   r}   r   s    r/   r   r     s     r1   c                    | j                   S )zk
    Simple fixture for testing keys in sorting methods.
    Tests None (no key) and the identity key.
    r   r   s    r/   sort_by_keyr    r   r1   )r+  NN)EgonVenkmanN)NCC1701Dr  r  c                    | j                   S )zP
    A 3-tuple of names, the first two for operands, the last for a result.
    r   r   s    r/   r6  r6    s      ==r1   c                    | j                   S )zI
    Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
    r   r   s    r/   indexer_slir    r   r1   c                    | j                   S )z<
    Parametrize over loc.__getitem__, iloc.__getitem__
    r   r   s    r/   
indexer_lir    r   r1   c                    | j                   S )z8
    Parametrize over __setitem__, iloc.__setitem__
    r   r   s    r/   
indexer_sir    r   r1   c                    | j                   S )z7
    Parametrize over __setitem__, loc.__setitem__
    r   r   s    r/   
indexer_slr    r   r1   c                    | j                   S )z:
    Parametrize over at.__setitem__, loc.__setitem__
    r   r   s    r/   
indexer_alr  &  r   r1   c                    | j                   S )z<
    Parametrize over iat.__setitem__, iloc.__setitem__
    r   r   s    r/   indexer_ialr  .  r   r1   c              #     K   t        j                  d| j                        5  | j                  rt         j                  j                  nd ddd       y# 1 sw Y   yxY ww)z
    Fixture to check if performance warnings are enabled. Either produces
    ``PerformanceWarning`` if they are enabled, otherwise ``False``.
    zmode.performance_warningsFN)rv   option_contextr   r'   PerformanceWarningr   s    r/   performance_warningr  6  sM      
		6	F G.5mmbii**FG G Gs   !A#+A	A#A A#c                 N    t         j                  j                  j                  du S )z=
    Fixture to check if infer string option is enabled.
    T)rv   optionsfutureinfer_stringr}   r1   r/   using_infer_stringr  @  s    
 ::))T11r1   c                 N    t         j                  j                  j                  du S )NT)rv   r  r  python_scalarsr}   r1   r/   using_python_scalarsr  H  s    ::++t33r1   zEurope/Warsawzdateutil/Europe/Warsawz	list[Any]_warsawsc                    | j                   S )zE
    tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
    r   r   s    r/   warsawr  R  r   r1   c                f    | t        t        j                               z  }|j                          |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
    )rA   uuiduuid4touch)tmp_path	file_paths     r/   	temp_filer  Z  s)     3tzz|,,IOOr1   r?   )scopec               #  z   K   t         j                  j                         5 } |  d d d        y # 1 sw Y   y xY wwr   )rF   MonkeyPatchcontext)mps    r/   monkeysessionr  e  s3     				#	#	%   s   ;/	;8;c              #     K   | j                   }t        j                  d|       5  | d d d        y # 1 sw Y   y xY ww)Nzfuture.distinguish_nan_and_na)r   rv   r  )r   opts     r/   using_nan_is_nar  k  s;     
--C			:G	D 	  s   $A 4	A =A r   )rI   zpytest.ItemrJ   rA   rK   rA   r   r   )r   z
type[dict])r   ztype[abc.Mapping])r   r!   )r   r   )r   r   )r  rA   r   zCallable[..., str])r   r   )r   z#tuple[Hashable, Hashable, Hashable])r   zIterator[bool | type[Warning]])r   bool)r   rA   (H  __doc__
__future__r   collectionsr   r   r   r   r   r	   r`  r
   r{  operatorr  typingr   r   r  dateutil.tzr   r   
hypothesisr   stnumpyru   rF   pandas.compat._optionalr   pandas.util._test_decoratorsutil_test_decoratorstdpandas.core.dtypes.dtypesr   r   pandasrv   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%   r0   r@   rL   r`   settingsregister_profileHealthChecktoo_slowdiffering_executorsload_profilesplitrC   getattrtseriesoffsetsclsregister_type_strategybuildsintegersbooleansfixturerx   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(  r7  r?  rG  rP  rX  r9   r  r  r  from_breakslinspacer  r   r#  r|  idxkeysr   r\   r(  r  
startswithr  r  r  r  r  _seriesr  NARROW_NP_DTYPESr   _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reprTIMEZONE_IDSparametrize_fixture_docrA   r  r  _UTCSappendr  utc_fixture2r  unit2STRING_DTYPESr  NAr  r  r  r  r  r!  string_storage2string_dtype_arguments2BYTES_DTYPESr#  OBJECT_DTYPESr&  rS  r)  any_string_dtype2DATETIME64_DTYPESr+  TIMEDELTA64_DTYPESr-  r4  FLOAT_NUMPY_DTYPESr6  FLOAT_EA_DTYPESr8  ALL_FLOAT_DTYPESr:  COMPLEX_DTYPESr<  COMPLEX_FLOAT_DTYPESr>  SIGNED_INT_NUMPY_DTYPESr@  UNSIGNED_INT_NUMPY_DTYPESrB  ALL_INT_NUMPY_DTYPESrD  ALL_INT_EA_DTYPESrF  ALL_INT_DTYPESrH  rJ  ALL_INT_PYARROW_DTYPES_STR_REPRFLOAT_PYARROW_DTYPES_STR_REPRrL  SIGNED_INT_EA_DTYPESrN  ALL_REAL_NUMPY_DTYPESrP  ALL_REAL_DTYPESrR  ALL_NUMPY_DTYPESrT  ALL_REAL_NULLABLE_DTYPESrV  ALL_NUMERIC_DTYPESrX  ra  _any_skipna_inferred_dtyper   rf  rq  r  __all__
issubclassr  r  r  r6  setitemlocilocr  r  r  r  atr  iatr  r  r  r  r  __annotations__r  r  r  r  )r  r   valueindex_idr   rS  pairos   00000000r/   <module>rF     s   ( #    	  	   '   > ) )
      
   	K!&:6,I$1<l    $ $''22 % 	        - 8==? D
"**$$d
+CBYRYYskbkk#r2kbkkmL 499; 
D
"**$$d
+CB		bkk"a !bkkm"++R8		

 @EEG 
D
"**$$d
+CB		bkk#r"!bkkm%"++R@		

( ! ! 1 1 17NO P e}%	 &	 *+ , e}% & e}% & e}% & /0 1 ;< = ;< = ;< = V=2==#=>

 V=2==#=>		 e}% & :; < 
K01 2 h'( ) e}% & BC D e}% & e}% & e}% & w   v  r,FG H  bffbff-. / -  r((.HI J ! 	6*+ , vWh,?@	 A	 vrxx06RS T vy"((;AUV W ! 	 	  0  "   		 	(*eE"I6qwqc]6fE*eE"I6qwqc]6eD* 
<4* :lB<H	*
 l<#>* wE* Z^* E)"))B-v.* U9299R=0* U9299R=0* U9299R=0* U9299R=0* eIBIIbM2* eIBIIbM2* eIBIIbM2*  uYRYYr])4!*" uYRYYr])4#*$ 5$*&9%*& %u)6'*( 		"K(4)"))Bk2R+RR)*. %		"L)D9299R|3T,TT/*4 #DL1$455*6 )))+"++a"*EF7*8 U2Y9*: $j$$!9T:;*@ 8:A*B !C*D u'(E*F E)"))B-w7G*H U9299R=9I*J eIBIIbM;K*L U9299R=//5YGM*N Ur3AGA3-3;KLO*V 
r;AGA3-;CTU
VC%(L!" |((*+8 ,8 *002U*UJ:W
.
.  ',,.CNN34AA5*- 	
+
+4   C C  ; (--/% 8*F#^E%:: ! ! $$	 	 ~~gb	E"I6qBqc(6S!  F<E7EnE  ,1134A 5A <>;O;O27u~~gu- 
      	   388:;H <H 
 
 
 
 U U. 	q	"M'7$CD	s#	&i(IJ			$k2	3	'5l|4<<SA6	
 
3	!23
 r334 5 		5<=< $	%$	   ./ 0 !%.  ./ 0 *,CC ' ( 		 ?@	 A	 N G  12 3 < <  J 			GILLYQ YR u-	" S!QT"MM,'MM% 	
 "++AQ+ C-.yl3 4 / CQR 012y},qr*:; < 3 
6	LL u   ./ 0 	 r''( ) 	255i'}r}}Y/GHi(i0HI	266		-- &mbmmI.FG i(i0HIi'}r}}Y/GH** YmbmmI&>? 	255i'}r}}Y/GHi(i0HI	266		 YmbmmI&>? !0  r' ( r''( ) 	255i'}r}}Y/GHi(i0HI	266	 1! 1$ %  r++, - r,,- .   r,,- . r))* + r**+
 ,
 r(() * r../ 0 r112
 3
 r334	 5	 r../ 0" r++, -  r(() *2 r++b.@.@@A B* (() 	&&': r../	 0	 r//0 1( r))* +, r**+! ,!H r223 4> r,,- .F RVVS!"RUUC !sBFFC !tRVVT"#rvvrvvrvv&'bMsBFFA&'sBFFC !#rvvs#$BFFAQ,-RVVWQZ01rvvu%&ruue$%MBMM,/|9TUV)J':1FGHd4AT1a(89:() 9Q<167d1grvvtAw'(tbfffTl34(1a."&&(1a.9:3 8 3DG
 1s;," <,"d & &$  @  ##gbjj!,bjjoo>1; 	

A k*+ , !,	 			ruu	 

BFFBGG45 6 () * 

BGG,- . 

BFF+, - rvv' ( () * e}%G &G 2 2 4 4 '(@A) AOODMM/23 x  !   i  !
 e}% &g@  Kp 76L 4 <(Z  7(D ,DZs   .A|= ;A}A}&A}A}A}
A}
+A}%
A}+'A}6:A}1A}6A}<F9A~m>A~o9AA~|=A}}A}}1A}6