
    A>i                    P<   % S r SSKJr  SSKJr  SSKJrJrJrJrJ	r	  SSK
Jr  SSKrSSKrSSKrSSKJrJr  SSKrSSKJrJr  SSKrSS	KJr  SSKrSSKrSS
KJr  SSKJs  J r!  SSK"J#r#J$r$  SSK%r&SSK%J'r'J(r(J)r)J*r*J+r+J,r,J-r-J.r.J/r/J0r0J1r1J2r2  SSK3J4r5  SSK6J7r7  SSK8J9r9J:r:  \(       a
  SSK;J<r<J=r=J>r>   SSK?r@C@SrA\" SSS9rCGSUS jrDS rEGSVS jrFGSUS jrG\R                  R                  SSSS\R                  R                  \R                  R                  4S9  \R                  R                  S5        SR                  5        Hc  rO\P" \&R                  R                  \O5      rS\R                  " \S\R                  " \S\R                  " SS5      \R                  " 5       S 95        Me     S!R                  5        Hs  rO\P" \&R                  R                  \O5      rS\R                  " \S\R                  " \S\R                  " S"S#5      \R                  " 5       \R                  " S$S%S&9S'95        Mu     S(R                  5        Hs  rO\P" \&R                  R                  \O5      rS\R                  " \S\R                  " \S\R                  " S)S*5      \R                  " 5       \R                  " S$S%S&9S+95        Mu     \R                  " SS,9GSUS- j5       rY\R                  " SS,9GSUS. j5       rZ\R                  " / S/QS0 S19S2 5       r[\R                  " SS/S39S4 5       r\\R                  " / S5QS39S6 5       r]\R                  " SS/S39S7 5       r^\R                  " SS/S39S8 5       r_\R                  " SS/S39S9 5       r`\R                  " / S:QS39S; 5       ra\R                  " / S<QS39S= 5       rb\R                  " / S>QS39S? 5       rc\R                  " / S>QS39S@ 5       rd\R                  " SSASBSCSDSE\R                  " SF\!R                  " SG5      SH9/S39SI 5       rg\R                  " SASBSCSDSE\R                  " SF\!R                  " SG5      SH9/S39SJ 5       rh\R                  " SS/S39SK 5       ri\R                  " / SLQS39SM 5       rj\R                  " SNSO/S39SP 5       rk\R                  " SS/S39SQ 5       rl\R                  " SS/S39SR 5       rm\R                  " / SSQS39ST 5       rn\R                  " SS/S39SU 5       ro\R                  " SS/S39SV 5       rp\R                  " SS/S39SW 5       rq\R                  " S/S39SX 5       rr\R                  " S/S39SY 5       rs\R                  " \5R                  SZ S19S[ 5       ru\urv\R                  " S\R                  \&R                  /S39S\ 5       ry\yrz\R                  " \5R                  S] S19S^ 5       r|\|r}\R                  " \(\-/S39S_ 5       r~\R                  " \9\-/S`Sa/S19Sb 5       r\R                  " \9\-\&GR                   // ScQS19Sd 5       r\R                  " \9\-\(\&GR                   /Se S19Sf 5       r\r\R                  GSWSg j5       r\R                  GSXSh j5       r\R                  Si 5       r\R                  GSYSj j5       r\R                    GSZSk j5       rSl rSm r0 Sn\9" \" So5       V s/ s H  n SpU  3PM
     sn \Sq9_Sr\9" \" So5       V s/ s H  n SpU  3PM
     sn SSq9_Ss\0" StSoSu9_Sv\0" StSoSwSx9_Sy\1" StSoSzS{9_S|\2" S}SoSzS~9_S\," So5      _S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_0 S\9" SS/S#-  \Sq9_S\9" SS/S#-  \Sq9_S\9" \GR                  " SoSSq9S\GR                  " SoSSq9-  -   5      _S\9" \GR                  " SoSSq9S\GR                  " SoSSq9-  -   5      _S\'" \" S5      S-  5      _S\*GR                   " \GR"                  " SSSS95      _S\9" / 5      _S\:GR$                  " \" / SQ/ SQSS95      _S\" 5       _S\" 5       _S\9" / SQ5      _S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      SSq9_S\9" \GR                  " So5      GR)                  \5      SSq9_S\9" \&GR                   " \" So5       V s/ s H  n SpU  3PM
     sn SSq95      _Er\A(       a7  \9" \&GR                   " \" So5       V s/ s H  n SpU  3PM
     sn SSq95      r\\S'   \R                  " \GR/                  5       S39S 5       r\R                  " \GR3                  5        VVs/ s H  u  p\" U\:5      (       a  M  UPM     snnS39S 5       r\R                  " \GR3                  5        VVs/ s H8  u  pUGR9                  S5      (       a  M  US;   a  M&  \" U\:5      (       a  M6  UPM:     snnS39S 5       r\R                  GS[S j5       r\R                  GS[S j5       r\R                  GS[S j5       rS r\GR3                  5        VVs0 s H  u  p4SU S3\" U5      _M     snnr\R                  GS[S j5       r\5GRH                   VV s0 s H;  nUGRJ                   S3\-" \" S5      \" S5       V s/ s H  n SU  3PM
     sn SUS9_M=     sn nr0 \E\E\Er\R                  " \GR/                  5       S39S 5       r\5GRR                   Vs0 s H  oUGRJ                   S3\-" U5      _M     snr0 \E\E\E\Er\R                  " \GR/                  5       S39S 5       r\R                  GSZS j5       r\R                  GSZS j5       r\R                  GS[S j5       r\R                  " \)" SS#S9\$" SS5      4\)" SSS9\$" SS5      4\+" SSS9S4\+" SSzS9S4\/" SSS9GRa                  S5      \#" SSS94\." SS9S4/S39S 5       r\R                  " \5GRd                  S39S 5       r\R                  " \GRh                  \7GRj                  \GRl                  \7GRn                  \GRp                  \7GRr                  \GRt                  \7GRv                  \GRx                  \7GRz                  \GR|                  \7GR~                  \GR                  \7GR                  \GR                  \GR                  \GR                  \GR                  \GR                  \GR                  \GR                  \7GR                  \GR                  \7GR                  \GR                  \7GR                  /S39S 5       r\R                  " \GRh                  \7GRj                  \GRl                  \7GRn                  \GRp                  \7GRr                  \GRt                  \7GRv                  \GRx                  \7GRz                  \GR|                  \7GR~                  \GR                  \7GR                  /S39S 5       r/ SQr\R                  " \S39S 5       rSS/r\R                  " \S39S 5       r\\-   r\R                  " \S39S 5       r\R                  " \GR                  \GR                  \GR                  \GR                  \GR                  \GR                  /S39S 5       r\R                  " / SQS39S 5       r\R                  " / SQS39S 5       r/ SQr\R                  " \S39S 5       r\R                  S 5       r\R                  GS\S j5       rSSSSSSSSSS\" 5       \" 5       \	GR                  \	" \" S$S95      \	" \" SS9SS9/r\Cbe  \GR                  \CGR                  S5      \CGR                  S5      \CGR                  S5      \CR                  Sw5      \CR                  S5      45        \ V s/ s H  n \" U 5      PM     sn r\!GR                  " \" \5      5      \R                  " \\S19S 5       5       r\!GR                  " \" \S$S 5      5      \R                  " \S$S \S$S S19S 5       5       rSS\" 5       \	GR                  /r\Cb  \GR                  \CGR                  5        \R                  " \S39S 5       r\r\R                  " / SQS39S 5       r\r\R                  " \5GR                  S39S 5       r\R                  " S\&GR                  4\R                  " S\&GR                  4\!R                  " S5      SH9\R                  " S\R                  4\!R                  " S5      SH9S\R                  4// SQS19S 5       r\R                  " S\R                  " S\!R                  " S5      SH9/S39GS  5       r\R                  " \R                  " S\R                  4\!R                  " S5      SH9\R                  " S\&GR                  4\!R                  " S5      SH9/S39GS 5       r\R                  " S\R                  " S\!R                  " S5      SH9/S39GS 5       r\R                  " S\&GR                  4\R                  " S\&GR                  4\!R                  " S5      SH9\R                  " S\R                  4\!R                  " S5      SH9S\R                  4// SQS19GS 5       r\R                  " GS\R                  " S\!R                  " S5      SH9/S39GS 5       r\r\r\R                  " \5GR                  S39GS 5       r\R                  " \5GR                  S39GS 5       r\R                  " \GR                  " Sn5      S\&GR                  4\R                  " S\&GR                  4\!R                  " S5      SH9\R                  " S\R                  4\!R                  " S5      SH9S\R                  4// GSQS19GS	 5       r\r\R                  " \5GR                  S39GS
 5       Gr \R                  " \5GR                  S39GS 5       Gr\R                  GS]GS j5       Gr\R                  " \5GR                  S39GS 5       Gr\R                  " \5GR                  S39GS 5       Gr\R                  " \5GR                  S39GS 5       Gr	\R                  " \5GR                  S39GS 5       Gr\R                  " \5GR                  S39GS 5       Gr\R                  " \5GR                  S39GS 5       Gr\R                  " \5GR                   S39GS 5       Gr\R                  " \5GR$                  S39GS 5       Gr\R                  " \5GR(                  S39GS 5       Gr\R                  " \5GR,                  S39GS 5       Gr\R                  " \5GR(                  \5GR                  -   S39GS 5       Gr\R                  " \5GR(                  \5GR                  -   \5GR2                  -   \5GR4                  -   S39GS 5       Gr\R                  " \5GR8                  S39GS 5       Gr\R                  " \5GR<                  S39GS 5       Gr\R                  " \5GR@                  S39GS 5       Gr!\R                  " \5GRD                  S39GS 5       Gr#\R                  " \5GRH                  S39GS 5       Gr%\R                  " \5GRL                  S39GS 5       Gr'SrS\R                  GS/4SrS\&GR                  GS/4GS S\&R                  GS/4GS!GS"\R                  GS#/4S\R                  \R                  \R                  /4S/ 4GS$S\R                  S/4GS S\R                  GS%/4GS&GS'\R                  GS%/4GS(S$\R                  S/4GS)S$\R                  GS%/4GS*\" S$5      \R                  \" S5      /4SS\R                  S/4SS\&GR                  S/4GS+\GRP                  " GS,5      \R                  \GRP                  " GS-5      /4Ss\/" GS.5      \R                  \/" GS/5      /4GS0\" GS1S$S$5      \R                  \" GS2S$S$5      /4GS3GS4\R                  GS5/4S|\" S$5      \R                  \" S5      /4GS6\" S$5      \R                  \" S5      /4Sy\+" GS15      \&R                  \+" GS25      /4S\)" SS$5      \R                  \)" SS5      /4/Gr)G\) Vs/ s H  ofS   PM	     snGr*\R                  " G\)G\*S19GS7 5       Gr+\R                  GS8 5       Gr,\R                  GS9 5       Gr-\R                  " \&R                  GR\                   Vs/ s HV  nG\/" \P" \&R                  U5      \&R                  GR`                  5      (       d  M:  UGS::w  d  MC  \P" \&R                  U5      PMX     snS39GS; 5       Gr1\R                  " SGS< /S39GS= 5       Gr2\R                  " GS>GS?GS@\R                  \R                  \R                  4\R                  \&R                  S4\R                  \&GR                  S4\&GR                  \&GR                  \&GR                  4/S39GS^GSA j5       Gr3\R                  " \5GRh                  \5GRj                  \5GRl                  /S39GSB 5       Gr7\R                  " \5GRj                  \5GRl                  /S39GSC 5       Gr8\R                  " \5GRh                  \5GRl                  /S39GSD 5       Gr9\R                  " \5GRh                  \5GRj                  /S39GSE 5       Gr:\R                  " \5GRv                  \5GRj                  /S39GSF 5       Gr<\R                  " \5GRz                  \5GRl                  /S39GSG 5       Gr>\R                  " SS/S39GS_GSH j5       Gr?\R                  GS`GSI j5       Gr@\R                  GS`GSJ j5       GrAGSKGSL/GrBGSMG\CGSN'   \Cb#  G\BGR                  \CR                  GSK5      5        \R                  " G\BS39GSaGSO j5       GrD\R                  GSP 5       GrE\R                  " GSQGSR9GSS 5       GrF\R                  " SS/S39GST 5       GrGg! \B a    SrA GN%f = fs  sn f s  sn f s  sn f s  sn f s  snnf s  snnf s  snnf s  sn f s  sn nf s  snf s  sn f s  snf s  snf (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                &    U R                  SSSS9  g )N--no-strict-data-filesstore_falsez6Don't fail if a test is skipped for missing data file.)actionhelp)	addoption)parsers    N/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pandas/conftest.pypytest_addoptionr0   h   s    
 E      c                r   ^^ SS K nSS KmUR                  R                  mUU4S jnX!R                  l        g )Nr   c                d   > TR                  U5      (       a  SUR                  ;   a  gT" XU5      $ )N.T)
isfunction__qualname__)selfmoduleobjectinspectorigs      r/   _from_module)pytest_sessionstart.<locals>._from_modulez   s3    f%%#1D1D*D D&))r1   )doctestr:   DocTestFinderr<   )sessionr>   r<   r:   r;   s      @@r/   pytest_sessionstartrA   p   s/       --D* *6&r1   strc                    U R                   R                  U5      (       a2  U R                  [        R                  R                  SU 35      5        gg)aR  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_warningrM      s@     yy$22WWI3FGH  r1   c                    UR                  S5      =(       d    UR                  SSS9n/ SQnU(       a!  U  H  nU H  u  pV[        XEU5        M     M     g g )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__rP   )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.idxminrX   )zSeriesGroupBy.idxmaxrY   )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)rW   z3DataFrameGroupBy.fillna with 'method' is deprecated)read_parquetz1Passing a BlockManager to DataFrame is deprecated)	getoptionrM   )itemsconfig
is_doctestignored_doctest_warningsrJ   rK   rL   s          r/   pytest_collection_modifyitemsra      sc    !!"56 &:J:JE ;K ;J% N D!9&t7; ":  r1   	pandas_ci   )databasedeadlinemax_examplessuppress_health_checkz)MonthBegin MonthEnd BMonthBegin BMonthEndic   )n	normalizez%YearBegin YearEnd BYearBegin BYearEnd         )	min_value	max_value)ri   rj   monthz1QuarterBegin QuarterEnd BQuarterBegin BQuarterEndi   )ri   rj   startingMonth)autousec                (    [         U S'   [        U S'   g)z2
Make `np` and `pd` names available for doctests.
nppdN)rv   rw   )doctest_namespaces    r/   add_doctest_importsry     s    
 !d dr1   c                 2    [         R                  " SS5        g)z4
Configure settings for all tests and test modules.
chained_assignmentraiseN)rw   
set_option r1   r/   configure_testsr     s    
 MM&0r1   )r   rm   indexcolumnsc                    SU < 3$ )Nzaxis=r~   xs    r/   <lambda>r     s
    5r1   )paramsidsc                    U R                   $ )z8
Fixture for returning the axis numbers of a DataFrame.
paramrequests    r/   axisr         
 ==r1   )r   c                    U R                   $ )ai  
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                    U R                   $ )z.
Boolean 'ordered' parameter for Categorical.
r   r   s    r/   orderedr   +  r   r1   c                    U R                   $ )z
Boolean 'dropna' parameter.
r   r   s    r/   dropnar   3  r   r1   c                    U R                   $ )z
Boolean 'sort' parameter.
r   r   s    r/   sortr   ;  r   r1   c                    U R                   $ )z
Boolean 'skipna' parameter.
r   r   s    r/   skipnar   C  r   r1   )firstlastFc                    U R                   $ )zO
Valid values for the 'keep' parameter used in
.duplicated or .drop_duplicates
r   r   s    r/   keepr   K       ==r1   )bothneitherleftrightc                    U R                   $ )z9
Fixture for trying all interval 'inclusive' parameters.
r   r   s    r/   inclusive_endpoints_fixturer   T  r   r1   )r   r   r   r   c                    U R                   $ )z4
Fixture for trying all interval closed parameters.
r   r   s    r/   closedr   \  r   r1   c                    U R                   $ )zK
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                    U R                   $ )zC
Fixture for trying common compression types in compression tests.
r   r   s    r/   compressionr   l       ==r1   c                    U R                   $ )z_
Fixture for trying common compression types in compression tests excluding
uncompressed case.
r   r   s    r/   compression_onlyr   ~  r   r1   c                    U R                   $ )z$
Fixture that an array is writable.
r   r   s    r/   writabler     r   r1   )innerouterr   r   c                    U R                   $ )z2
Fixture for trying all types of join operations.
r   r   s    r/   	join_typer     r   r1   nlargest	nsmallestc                    U R                   $ )z)
Fixture for trying all nselect methods.
r   r   s    r/   nselect_methodr     r   r1   c                    U R                   $ )z*
Fixture for 'na_action' argument in map.
r   r   s    r/   	na_actionr     r   r1   c                    U R                   $ )zB
Fixture for 'na_action' argument in sort_values/sort_index/rank.
r   r   s    r/   	ascendingr     r   r1   )averageminmaxr   densec                    U R                   $ )z&
Fixture for 'rank' argument in rank.
r   r   s    r/   rank_methodr     r   r1   c                    U R                   $ )z-
Fixture for 'as_index' argument in groupby.
r   r   s    r/   as_indexr     r   r1   c                    U R                   $ )z.
Fixture for 'cache' argument in to_datetime.
r   r   s    r/   cacher     r   r1   c                    U R                   $ )z6
Fixture for parallel keyword argument for numba.jit.
r   r   s    r/   parallelr     r   r1   c                    U R                   $ )z3
Fixture for nogil keyword argument for numba.jit.
r   r   s    r/   nogilr     r   r1   c                    U R                   $ )z6
Fixture for nopython keyword argument for numba.jit.
r   r   s    r/   nopythonr     r   r1   c                ,    [        U 5      R                  $ Ntype__name__r   s    r/   r   r     s    d1g6F6Fr1   c                    U R                   $ )z'
Fixture for each null type in pandas.
r   r   s    r/   nulls_fixturer     r   r1   c                    U R                   $ )zD
Fixture for each null type in pandas, each null type exactly once.
r   r   s    r/   unique_nulls_fixturer     r   r1   c                ,    [        U 5      R                  $ r   r   r   s    r/   r   r     s    Q8H8Hr1   c                    U R                   $ )z%
Fixture for each NaT type in numpy.
r   r   s    r/   np_nat_fixturer     r   r1   c                    U R                   $ )z3
Fixture to parametrize over DataFrame and Series.
r   r   s    r/   frame_or_seriesr     r   r1   r   seriesc                    U R                   $ )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                    U R                   $ )z?
Fixture to parametrize over Index, Series, and ExtensionArray
r   r   s    r/   index_or_series_or_arrayr   ,  r   r1   c                    U R                   $ r   )r   r   s    r/   r   r   4  s    1::r1   c                    U R                   $ )zQ
Fixture to test behavior for Index, Series, DataFrame, and pandas Array
classes
r   r   s    r/   box_with_arrayr   4  r   r1   c                 $     " S S[         5      n U $ )z$
Fixture for a dictionary subclass.
c                      \ rS rSrSS jrSrg)"dict_subclass.<locals>.TestSubDictiF  c                8    [         R                  " U /UQ70 UD6  g r   )dict__init__)r7   argskwargss      r/   r   +dict_subclass.<locals>.TestSubDict.__init__G  s    MM$000r1   r~   NreturnNone)r   
__module__r6   __firstlineno__r   __static_attributes__r~   r1   r/   TestSubDictr   F  s    	1r1   r   )r   )r   s    r/   dict_subclassr   @  s    1d 1 r1   c                 8     " S S[         R                  5      n U $ )z0
Fixture for a non-mapping dictionary subclass.
c                  8    \ rS rSrSS jrS rS	S jrS
S jrSrg)5non_dict_mapping_subclass.<locals>.TestNonDictMappingiS  c                    Xl         g r   _data)r7   underlying_dicts     r/   r   >non_dict_mapping_subclass.<locals>.TestNonDictMapping.__init__T  s    (Jr1   c                8    U R                   R                  U5      $ r   )r  __getitem__)r7   keys     r/   r  Anon_dict_mapping_subclass.<locals>.TestNonDictMapping.__getitem__W  s    ::))#..r1   c                6    U R                   R                  5       $ r   )r  __iter__r7   s    r/   r	  >non_dict_mapping_subclass.<locals>.TestNonDictMapping.__iter__Z  s    ::&&((r1   c                6    U R                   R                  5       $ r   )r  __len__r
  s    r/   r  =non_dict_mapping_subclass.<locals>.TestNonDictMapping.__len__]  s    ::%%''r1   r   Nr   )r   r$   )r   int)	r   r   r6   r   r   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            
        [        [        R                  R                  S5      R	                  S5      [        [        S5      5      [        SSSS9S9n U R                  S	 S
 S /5      R                  5       nUR                  R                  UR                  R                   Vs/ s H  o"R                  S5      PM     sn5      Ul
        UR                  R                  / SQSS9  U$ s  snf )zx
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                    U R                   $ r   )yearr   s    r/   r   Amultiindex_year_month_day_dataframe_random_data.<locals>.<lambda>q  s    r1   c                    U R                   $ r   )rq   r   s    r/   r   r  q  s    177r1   c                    U R                   $ r   )dayr   s    r/   r   r  q  s    aeer1   i8)r  rq   r"  T)inplace)r   rv   randomdefault_rngstandard_normalr    listr   groupbysumr   
set_levelslevelsastype	set_names)tdfymdlevs      r/   /multiindex_year_month_day_dataframe_random_datar2  f  s     
		a 00:d6l#s=C
 ++'):OL
M
Q
Q
SC		$$#))BRBR%SBR3jj&6BR%STCIII0$?J &Ts   %C)c                 4    [        / SQ/ SQ// SQ/ SQ/SS/S9$ )z3
2-level MultiIndex, lexsorted, with string names.
foobarbazquxonetwothree)
r   r   r   rm   rm   r  r     r=  r=  )
r   rm   r  r   rm   rm   r  r   rm   r  r   second)r,  codesnames)r!   r~   r1   r/   %lexsorted_two_level_string_multiindexrA  x  s+    
 ,.EF-/MN! r1   c           	         U n[        [        R                  R                  S5      R	                  S5      U[        / SQSS9S9$ )z2DataFrame with 2 level MultiIndex with random datar  )
   r=  )Ar  CexprD   r   r   )r   rv   r%  r&  r'  r    )rA  r   s     r/    multiindex_dataframe_random_datarI    s@    
 2E
		a 009oE2 r1   c                     [        / SQ5      n [        SS/5      n[        R                  " / SQ5      n[        R                  " / SQ5      nSS/n[        X/X#/USS	9$ )
zB
MultiIndex used to test the general functionality of this object
r4  r:  r;  )r   r   rm   r  r=  r=  )r   rm   r   rm   r   rm   r   r>  F)r,  r?  r@  verify_integrity)r    rv   r   r!   )
major_axis
minor_axismajor_codesminor_codesindex_namess        r/   _create_multiindexrQ    sd     34Ju~&J((-.K((-.KH%K'(	 r1   c            
     P    [         R                  " SS/SS/[        SSSS9// S	QS
9$ )z:
MultiIndex with a level that is a tzaware DatetimeIndex.
rm   r  ab20130101r=  
US/Easternr  tzr9  )r@  )r!   from_productr   r~   r1   r/   _create_mi_with_dt64tz_levelrZ    s5    
 ""
Q#sZ
A,OP% r1   r9   rC  pandas_dtypestringr   z
2020-01-01)r  zdatetime-tzz
US/PacificrW  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)r5  r6  r7  )rm   r  r=  )strictmi-with-dt64tz-levelmultirepeats)r   r   rm   rm   r  r  nullable_intInt64nullable_uintUInt16nullable_floatFloat32nullable_boolbooleanzstring-pythonzstring[python]zstring[pyarrow]zstring-pyarrowc                B    [         U R                     R                  SS9$ )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                F    U R                   n[        U   R                  SS9$ )z0
index fixture, but excluding MultiIndex cases.
Fr  )r   r  r  )r   r  s     r/   
index_flatr    s&     --C!!u!--r1   )r  uintfloat)rb  ru  rz  rm  c                8   [         U R                     nU R                  S;   aD  UR                  5       nS/US   SS Q7US'   S/US   SS Q7US'   [        R                  " U5      $ UR
                  R                  5       nSUS'   SUS'   [        U5      " USS9$ )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.
)rv  rx  ry  Nr   rm   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CyE**r1   c            
         [        [        R                  " S[        R                  S9S-  [	        [        S5       V s/ s H  n SU  3PM
     sn 5      SS9$ s  sn f )z;
Fixture for Series of floats with Index of unique strings
   r\  g?i_r   r   rD   )r   rv   arangerl  r    rb  is    r/   string_seriesr  !  sO    
 
		"BJJ'#-uRy1y!r!Xy12 1s   Ac                     [        S5       V s/ s H  n SU  3PM
     nn [        [        S5       V s/ s H  n SU  3PM
     sn 5      n[        XS[        S9$ s  sn f s  sn f )zA
Fixture for Series of dtype object with Index of unique strings
r  foo_bar_objectsr   rD   r]  )rb  r    r   r9   )r  datar   s      r/   object_seriesr  -  s\    
 !&b	*	1d1#J	D*uRy1y!T!:y12E$)6BB +1s
   AAc            	         [        [        R                  R                  S5      R	                  S5      [        SSSS9SS9$ )z1
Fixture for Series of floats with DatetimeIndex
r  r  r  r  r  tsr  )r   rv   r%  r&  r'  r   r~   r1   r/   datetime_seriesr  7  s=    
 
		a 004r< r1   c                    [        U 5      n[        R                  R                  S5      R	                  U5      n[        X SSS9$ )zHelper for the _series dictr  rS  F)r   rD   r  )lenrv   r%  r&  r'  r   )r   sizer  s      r/   _create_seriesr  C  s9    u:D99  #33D9D$#E::r1   zseries-with-z-indexc                    [        U 5      $ )z=
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-rS  r  c                B    [         U R                     R                  SS9$ )zp
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    r/   index_or_series_objr  c  s!     !/44%4@@r1   c                B    [         U R                     R                  SS9$ )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    r/   index_or_series_memory_objr  y  s!     (6;;;GGr1   c            
         [        [        R                  " S[        R                  S9[	        [        S5       V s/ s H  n SU  3PM
     sn 5      [	        [        S5      5      S9$ s  sn f )z^
Fixture for DataFrame of ints with index of unique strings

Columns are ['A', 'B', 'C', 'D']
r  r  r\  r  r  r  rH  )r   rv   onesrf  r    rb  r(  r  s    r/   	int_framer    sS     
rxx(r3AtA3Z34d6l# 3s   A%c            
         [        [        R                  R                  S5      R	                  S5      [        [        S5       V s/ s H  n SU  3PM
     sn 5      [        [        S5      5      S9$ s  sn f )za
Fixture for DataFrame of floats with index of unique strings

Columns are ['A', 'B', 'C', 'D'].
r  r  r  r  r  rH  )r   rv   r%  r&  r'  r    rb  r(  r  s    r/   float_framer    s^     
		a 009r3AtA3Z34d6l# 3s   A0c                 t   [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      [        SSS5      /
n [        [        R                  R	                  S5      R                  [        U 5      5      U S9$ )z>
Fixture for Series with a DatetimeIndex that has duplicates.
i  rm   r  r=  r  rl   r  )r   r   rv   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-01rV  )rX  s)unitrX  i  )secondsztimedelta64[us]c                    U R                   $ )z3
Fixture that tests each scalar and datetime type.
r   r   s    r/   ea_scalar_and_dtyper        " ==r1   c                    U R                   $ )z<
Fixture for dunder names for common arithmetic operations.
r   r   s    r/   all_arithmetic_operatorsr    r   r1   c                    U R                   $ )zM
Fixture for operator and roperator arithmetic, comparison, and logical ops.
r   r   s    r/   all_binary_operatorsr        D ==r1   c                    U R                   $ )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                    U R                   $ )z&
Fixture for numeric reduction names.
r   r   s    r/   all_numeric_reductionsr  .  r   r1   allanyc                    U R                   $ )z&
Fixture for boolean reduction names.
r   r   s    r/   all_boolean_reductionsr  9  r   r1   c                    U R                   $ )z6
Fixture for all (boolean + numeric) reduction names.
r   r   s    r/   all_reductionsr  D  r   r1   c                    U R                   $ )z3
Fixture for operator module comparison functions.
r   r   s    r/   comparison_opr  L       ==r1   )__le____lt____ge____gt__c                    U R                   $ )zU
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                    U R                   $ )zE
Fixture for dunder names for common logical operations

* |
* &
* ^
r   r   s    r/   all_logical_operatorsr  j       ==r1   )cumsumcumprodcummincummaxc                    U R                   $ )z(
Fixture for numeric accumulation names
r   r   s    r/   all_numeric_accumulationsr  {  r   r1   c                $    U R                  S5      $ )zJ
Returns the configuration for the test setting `--no-strict-data-files`.
r)   )r\   )pytestconfigs    r/   strict_data_filesr    s    
 !!":;;r1   c                   ^ ^ [         R                  R                  [         R                  R                  [        5      S5      mUU 4S jnU$ )a  
Get the path to a data file.

Parameters
----------
path : str
    Path to the file, relative to ``pandas/tests/``

Returns
-------
path including ``pandas/tests``.

Raises
------
ValueError
    If the path doesn't exist and the --no-strict-data-files option is not set.
testsc                    > [         R                  R                  " T/U Q76 n[         R                  R                  U5      (       d0  T(       a  [	        SU S35      e[
        R                  " SU S35        U$ )NzCould not find file z' and --no-strict-data-files is not set.zCould not find r4   )osrK   joinexists
ValueErrorrG   skip)r   rK   	BASE_PATHr  s     r/   decodatapath.<locals>.deco  sf    ww||I--ww~~d##  *4&0WX  KK/$q12r1   )r  rK   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  r5  rG  i,  ic                    U R                   $ )z<
Fixture for trying timezones including default (None): {0}
r   r   s    r/   tz_naive_fixturer    r   r1   c                    U R                   $ )z,
Fixture for trying explicit timezones: {0}
r   r   s    r/   tz_aware_fixturer	    r   r1   utczdateutil/UTCc                    U R                   $ )zI
Fixture to provide variants of UTC timezone strings and tzinfo objects.
r   r   s    r/   utc_fixturer    r   r1   )r  msusnsc                    U R                   $ )z
datetime64 units we support.
r   r   s    r/   r  r    r   r1   c                    U R                   $ )z>
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                J    U R                   u  p[        R                  " X5      $ )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   rw   StringDtyper   storagena_values      r/   string_dtype_no_objectr    s    0  G>>',,r1   c                    U R                   $ )zQ
Parametrized fixture for string dtypes.

* 'string[python]'
* 'string[pyarrow]'
r   r   s    r/   nullable_string_dtyper!  *       ==r1   c                <    [         R                  " U R                  6 $ )za
Parametrized fixture for string dtypes backed by Pyarrow.

* 'str[pyarrow]'
* 'string[pyarrow]'
)rw   r  r   r   s    r/   pyarrow_string_dtyper$  :  s     >>7==))r1   c                    U R                   $ zR
Parametrized fixture for pd.options.mode.string_storage.

* 'python'
* 'pyarrow'
r   r   s    r/   string_storager'  J  r"  r1   c                    U R                   $ )zy
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                    U R                   $ r&  r   r   s    r/   dtype_backendr,  s  r"  r1   c                    U R                   $ )z;
Parametrized fixture for bytes dtypes.

* bytes
* 'bytes'
r   r   s    r/   bytes_dtyper.         ==r1   c                    U R                   $ )z>
Parametrized fixture for object dtypes.

* object
* 'object'
r   r   s    r/   object_dtyper1    r/  r1   )zstring=objectr  r  r  r  c                    [        U R                  [        R                  5      (       a  U R                  $ U R                  u  p[        R
                  " X5      $ )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   rv   r]  rw   r  r  s      r/   any_string_dtyper4    s@    2 '--**}} $MM~~g00r1   c                    U R                   $ )zL
Parametrized fixture for datetime64 dtypes.

* 'datetime64[ns]'
* 'M8[ns]'
r   r   s    r/   datetime64_dtyper6    r/  r1   c                    U R                   $ )zN
Parametrized fixture for timedelta64 dtypes.

* 'timedelta64[ns]'
* 'm8[ns]'
r   r   s    r/   timedelta64_dtyper8    r/  r1   c            
          [        SSSSSSSS9$ )z%
Fixture emits fixed Timestamp.now()
i  rm   rn   r        )r  rq   r"  hourminuter>  microsecond)r   r~   r1   r/   fixed_now_tsr?    s     
 1RR r1   c                    U R                   $ )zJ
Parameterized fixture for float dtypes.

* float
* 'float32'
* 'float64'
r   r   s    r/   float_numpy_dtyperA    r  r1   c                    U R                   $ )zB
Parameterized fixture for float dtypes.

* 'Float32'
* 'Float64'
r   r   s    r/   float_ea_dtyperC    r/  r1   c                    U R                   $ )zb
Parameterized fixture for float dtypes.

* float
* 'float32'
* 'float64'
* 'Float32'
* 'Float64'
r   r   s    r/   any_float_dtyperE    r  r1   c                    U R                   $ )zS
Parameterized fixture for complex dtypes.

* complex
* 'complex64'
* 'complex128'
r   r   s    r/   complex_dtyperG    r  r1   c                    U R                   $ )z
Parameterized fixture for complex and numpy float dtypes.

* complex
* 'complex64'
* 'complex128'
* float
* 'float32'
* 'float64'
r   r   s    r/   complex_or_float_dtyperI    s     ==r1   c                    U R                   $ )z`
Parameterized fixture for signed integer dtypes.

* int
* 'int8'
* 'int16'
* 'int32'
* 'int64'
r   r   s    r/   any_signed_int_numpy_dtyperK  #  r  r1   c                    U R                   $ )z`
Parameterized fixture for unsigned integer dtypes.

* 'uint8'
* 'uint16'
* 'uint32'
* 'uint64'
r   r   s    r/   any_unsigned_int_numpy_dtyperM  1  r   r1   c                    U R                   $ )z
Parameterized fixture for any integer dtype.

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

* 'UInt8'
* 'Int8'
* 'UInt16'
* 'Int16'
* 'UInt32'
* 'Int32'
* 'UInt64'
* 'Int64'
r   r   s    r/   any_int_ea_dtyperQ  P  r  r1   c                    U R                   $ )z
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_dtyperS  a  s    . ==r1   c                    U R                   $ )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_dtyperU  {  r  r1   c                    U R                   $ )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_dtyperW    s    @ ==r1   c                    U R                   $ )zf
Parameterized fixture for any signed nullable integer dtype.

* 'Int8'
* 'Int16'
* 'Int32'
* 'Int64'
r   r   s    r/   any_signed_int_ea_dtyperY    r   r1   c                    U R                   $ )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_dtyper[    s    $ ==r1   c                    U R                   $ )z
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_dtyper]    s    ( ==r1   c                    U R                   $ )aT  
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_dtyper_    r  r1   c                    U R                   $ )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_dtypera    s    : ==r1   c                    U R                   $ )a9  
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_dtyperc  2  s    > ==r1   cmixedbytes   a   czmixed-integerg       @floatingg      ?integerzmixed-integer-floatdecimal
datetime64z
2013-01-01z
2018-01-01rU  20180101r   i  i  complexy      ?      ?y       @       @r   c                V    U R                   u  p[        R                  " U[        S9nX4$ )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   rv   r   r9   )r   inferred_dtyper  s      r/   any_skipna_inferred_dtyperq  u  s,    R %]]NXXfF+F !!r1   c                     [         R                  " SSS9  SSKJn   SSKJn  U" 5       nSUR                  l        U " US9$ )	z^
Get an instance of IPython.InteractiveShell.

Will raise a skip if IPython is not installed.
IPythonz6.0.0)
minversionr   )InteractiveShell)Configz:memory:)r^   )rG   importorskipIPython.core.interactiveshellru  traitlets.configrv  HistoryManager	hist_file)ru  rv  rd  s      r/   ipr|    s<     	g6> (A!+A1%%r1   c               #    #    [         R                  " S5      n [         R                  " S5      n[         R                  " S5      nUR                  R                  5       n U R	                  5          U R                  S5        Sv   SSS5        UR                  R                  5         UR                  R                  U5        UR                  S5        [        R                  " S5        g! , (       d  f       Nk= f! UR                  R                  5         UR                  R                  U5        UR                  S5        [        R                  " S5        f = f7f)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  rm   )rG   rw  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 C< 0C+C< AE+
C95C< <AEETickc                    U R                   $ )zF
Fixture for Tick based datetime offsets available for a time series.
r   r   s    r/   tick_classesr    r  r1   c                    U $ r   r~   r   s    r/   r   r     s    r1   c                    U R                   $ )z_
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   )r5  NN)EgonVenkmanN)NCC1701Dr  r  c                    U R                   $ )zH
A 3-tuple of names, the first two for operands, the last for a result.
r   r   s    r/   r@  r@    s      ==r1   c                    U R                   $ )zA
Parametrize over __setitem__, loc.__setitem__, iloc.__setitem__
r   r   s    r/   indexer_slir    r   r1   c                    U R                   $ )z4
Parametrize over loc.__getitem__, iloc.__getitem__
r   r   s    r/   
indexer_lir    r   r1   c                    U R                   $ )z0
Parametrize over __setitem__, iloc.__setitem__
r   r   s    r/   
indexer_sir    r   r1   c                    U R                   $ )z/
Parametrize over __setitem__, loc.__setitem__
r   r   s    r/   
indexer_slr    r   r1   c                    U R                   $ )z2
Parametrize over at.__setitem__, loc.__setitem__
r   r   s    r/   
indexer_alr  &  r   r1   c                    U R                   $ )z4
Parametrize over iat.__setitem__, iloc.__setitem__
r   r   s    r/   indexer_ialr  .  r   r1   c              #     #    [         R                  " SU R                  5         U R                  (       a  [         R                  R                  OSv   SSS5        g! , (       d  f       g= f7f)z
Fixture to check if performance warnings are enabled. Either produces
``PerformanceWarning`` if they are enabled, otherwise ``False``.
zmode.performance_warningsFN)rw   option_contextr   r'   PerformanceWarningr   s    r/   performance_warningr  6  s@      
		6	F.5mmbii**F 
G	F	Fs   "A.0A	A.
A+'A.c                 N    [         R                  R                  R                  SL $ )z5
Fixture to check if infer string option is enabled.
T)rw   optionsfutureinfer_stringr~   r1   r/   using_infer_stringr  @  s    
 ::))T11r1   c                 N    [         R                  R                  R                  SL $ )NT)rw   r  r  python_scalarsr~   r1   r/   using_python_scalarsr  H  s    ::++t33r1   zEurope/Warsawzdateutil/Europe/Warsawz	list[Any]_warsawsc                    U R                   $ )z=
tzinfo for Europe/Warsaw using pytz, dateutil, or zoneinfo.
r   r   s    r/   warsawr  R  r   r1   c                h    U [        [        R                  " 5       5      -  nUR                  5         U$ )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
)rB   uuiduuid4touch)tmp_path	file_paths     r/   	temp_filer  Z  s)     3tzz|,,IOOr1   r@   )scopec               #     #    [         R                  R                  5        n U v   S S S 5        g ! , (       d  f       g = f7fr   )rG   MonkeyPatchcontext)mps    r/   monkeysessionr  e  s)     				#	#	% 
&	%	%s   A /	A 
=A c              #     #    U R                   n[        R                  " SU(       + 5         Uv   S S S 5        g ! , (       d  f       g = f7f)Nzfuture.distinguish_nan_and_na)r   rw   r  )r   opts     r/   using_nan_is_nar  k  s2     
--C			:G	D	 
E	D	Ds   )A
9	A

AA
r   )rJ   zpytest.ItemrK   rB   rL   rB   r   r   )r   z
type[dict])r   ztype[abc.Mapping])r   r!   )r   r   )r   r   )r  rB   r   zCallable[..., str])r   r   )r   z#tuple[Hashable, Hashable, Hashable])r   zIterator[bool | type[Warning]])r   bool)r   rB   (H  __doc__
__future__r   collectionsr   r   r   r   r   r	   rk  r
   r  operatorr  typingr   r   r  dateutil.tzr   r   
hypothesisr   stnumpyrv   rG   pandas.compat._optionalr   pandas.util._test_decoratorsutil_test_decoratorstdpandas.core.dtypes.dtypesr   r   pandasrw   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   rA   rM   ra   settingsregister_profileHealthChecktoo_slowdiffering_executorsload_profilesplitrD   getattrtseriesoffsetsclsregister_type_strategybuildsintegersbooleansfixturery   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  r2  rA  rI  rQ  rZ  rb  r9   r  r  r(  from_breakslinspacer  r   r-  r  idxkeysr   r]   r3  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_docrB   r  r	  _UTCSappendr  utc_fixture2r  unit2STRING_DTYPESr  NAr  r!  r$  r'  r)  r,  string_storage2string_dtype_arguments2BYTES_DTYPESr.  OBJECT_DTYPESr1  r]  r4  any_string_dtype2DATETIME64_DTYPESr6  TIMEDELTA64_DTYPESr8  r?  FLOAT_NUMPY_DTYPESrA  FLOAT_EA_DTYPESrC  ALL_FLOAT_DTYPESrE  COMPLEX_DTYPESrG  COMPLEX_FLOAT_DTYPESrI  SIGNED_INT_NUMPY_DTYPESrK  UNSIGNED_INT_NUMPY_DTYPESrM  ALL_INT_NUMPY_DTYPESrO  ALL_INT_EA_DTYPESrQ  ALL_INT_DTYPESrS  rU  ALL_INT_PYARROW_DTYPES_STR_REPRFLOAT_PYARROW_DTYPES_STR_REPRrW  SIGNED_INT_EA_DTYPESrY  ALL_REAL_NUMPY_DTYPESr[  ALL_REAL_DTYPESr]  ALL_NUMPY_DTYPESr_  ALL_REAL_NULLABLE_DTYPESra  ALL_NUMERIC_DTYPESrc  rl  _any_skipna_inferred_dtyper   rq  r|  r  __all__
issubclassr  r  r  r@  setitemlocilocr  r  r  r  atr  iatr  r  r  r  r  __annotations__r  r  r  r  )r  r  valueindex_idr   r]  pairos   00000000r/   <module>rQ     s  ( #    	  	   '   > ) )
      
   	K!&:6,I$1<l    $ $''22 % 	        - 8==?D
"**$$d
+CRYYsbkk#r2bkkmL @ 499;D
"**$$d
+C
		kk"a kkm++R8		
 < @EEGD
"**$$d
+C
		kk#r"kkm++R@		
 H( ! ! 1 1 17NO P e}%	 &	 *+ , e}% & e}% & e}% & /0 1 ;< = ;< = ;< = V2==#=>

 V2==#=>		 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6Iqwqc]I6fE*eE"I6Iqwqc]I6eD* 
<4* :lB<H	*
 l<#>* wE* Z^* E"))B-v.* U299R=0* U299R=0* U299R=0* U299R=0* eBIIbM2* eBIIbM2* eBIIbM2*  uRYYr])4!*" uRYYr])4#*$ 5$*&9%*& %u)6'*( 
		"K(4"))Bk2R+RR)*. %
		"L)D299R|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 U299R=9I*J eBIIbM;K*L U299R=//5YGM*N U
r3AGA3-3;KLO*V 
r;AGA3-;CTU
VC%(L!" |((*+8 ,8 *0022
*UJ:W2
.
.  ',,..JCNN34 	 AA	 	 5*- 	.
+
+4   C C  ; (--// 8*F#^E%::/ ! ! $$	 % ~~gb	E"I6IqBqc(I6S!  %	 F<E7EnE  ,1134A 5A <>;O;O;O%~~gu-;O 
      	   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		-- &bmmI.FG i(i0HIi'r}}Y/GH** YbmmI&>? 	255i'r}}Y/GHi(i0HI	266		 YbmmI&>? !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$%BMM,/|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2G2
 1s;," <,"d & &$  @  ###Agbjj!,bjjoo> 	CD; 	

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   3Aw Aw#6Aw(1Aw-,Aw2Aw7
'Aw7
Aw=
:Aw=
Aw=
Aw=
:Ax<(Ax$Ax	3Ax> AxC'Axh*Axj$9Ax#k!Ax#k*Ax#wAw wAw x	Ax