/usr/local/lib64/python3.6/site-packages/pandas/__pycache__
NameSizeModeActions
conftest.cpython-36.pyc306400644editdlrm
testing.cpython-36.pyc3980644editdlrm
_testing.cpython-36.pyc788440644editdlrm
_typing.cpython-36.pyc20710644editdlrm
_version.cpython-36.pyc5220644editdlrm
__init__.cpython-36.pyc107860644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/pandas/__pycache__/conftest.cpython-36.pyc (30640B)
3 9%Egqz@s dZddlmZddlmZmZmZmZddlm Z ddl Z ddl Z ddl m Z mZddlZddlmZddlZddlZddlmZmZddljjZddlZdd lmZddlj Z!dd l"m#Z#dd l$m%Z%m&Z&d d Z'ddZ(ddZ)ej*j+ddej,j-fdej*j.dxFdj/D]:Z0e1ej2j3e0Z4ej5e4ej6e4ej7d-dej8dqWxRdj/D]FZ0e1ej2j3e0Z4ej5e4ej6e4ej7d.dej8ej7ddddq\WxRdj/D]FZ0e1ej2j3e0Z4ej5e4ej6e4ej7d/dej8ej7dddd qWej9d!d"d#d$Z:ej9d!d"d%d&Z;ej9ddd'd(gd)d*d+d,d-Zej9d!d1dgd2d3d4Z?ej9d!d1dgd2d5d6Z@ej9d7d8d1gd2d9d:ZAej9d;dgd2d?d@ZBej9d;dgd2dAdBZCej9ddCdDdEdFgd2dGdHZDej9dCdDdEdFgd2dIdJZEej9d!d1gd2dKdLZFej9dMdNd;dsr6)paramsidscCs|jS)z@ Fixture for returning the axis numbers of a DataFrame. )param)requestrrraxissr;cCsdt|S)Nzaxis )r4)r5rrrr6scCs|jS)z= Fixture for returning the axis numbers of a Series. )r9)r:rrr axis_seriessr<F)r7cCs|jS)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). )r9)r:rrrobserveds r=cCs|jS)z6 Boolean 'ordered' parameter for Categorical. )r9)r:rrrorderedsr>firstlastcCs|jS)z[ Valid values for the 'keep' parameter used in .duplicated or .drop_duplicates )r9)r:rrrkeepsrAleftrightZbothZneithercCs|jS)z< Fixture for trying all interval closed parameters. )r9)r:rrrclosedsrDcCs|jS)zS Secondary closed fixture to allow parametrizing over all pairs of closed. )r9)r:rrr other_closedsrEgzipbz2zipxzcCs|jS)zK Fixture for trying common compression types in compression tests. )r9)r:rrr compressionsrJcCs|jS)zk Fixture for trying common compression types in compression tests excluding uncompressed case. )r9)r:rrrcompression_onlysrKcCs|jS)z, Fixture that an array is writable. )r9)r:rrrwritablesrLinneroutercCs|jS)z: Fixture for trying all types of join operations. )r9)r:rrr join_typesrOnlargest nsmallestcCs|jS)z1 Fixture for trying all nselect methods. )r9)r:rrrnselect_methodsrRnancCs|jS)z/ Fixture for each null type in pandas. )r9)r:rrr nulls_fixturesrTcCs|jS)zL Fixture for each null type in pandas, each null type exactly once. )r9)r:rrrunique_nulls_fixturesrUseriescCs|jS)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 )r9)r:rrrindex_or_series*s rWcCsGdddt}|S)z, Fixture for a dictionary subclass. c@seZdZddZdS)z"dict_subclass..TestSubDictc_stj|f||dS)N)dict__init__)selfargskwargsrrrrYBsz+dict_subclass..TestSubDict.__init__N)__name__ __module__ __qualname__rYrrrr TestSubDictAsr`)rX)r`rrr dict_subclass;sracCsGdddtj}|S)z8 Fixture for a non-mapping dictionary subclass. c@s,eZdZddZddZddZddZd S) z5non_dict_mapping_subclass..TestNonDictMappingcSs ||_dS)N)_data)rZZunderlying_dictrrrrYOsz>non_dict_mapping_subclass..TestNonDictMapping.__init__cSs |jj|S)N)rb __getitem__)rZkeyrrrrcRszAnon_dict_mapping_subclass..TestNonDictMapping.__getitem__cSs |jjS)N)rb__iter__)rZrrrreUsz>non_dict_mapping_subclass..TestNonDictMapping.__iter__cSs |jjS)N)rb__len__)rZrrrrfXsz=non_dict_mapping_subclass..TestNonDictMapping.__len__N)r]r^r_rYrcrerfrrrrTestNonDictMappingNsrg)rMapping)rgrrrnon_dict_mapping_subclassHs ricCsbtjd}|jddddddgj}|jjdd|jjDdd |jjd d d gdd |S) z DataFrame with 3 level MultiIndex (year, month, day) covering first 100 business days from 2000-01-01 with random data dcSs|jS)N)year)r5rrrr6hszAmultiindex_year_month_day_dataframe_random_data..cSs|jS)N)r+)r5rrrr6hscSs|jS)N)day)r5rrrr6hscSsg|]}|jdqS)i8)astype).0Zlevrrr jszCmultiindex_year_month_day_dataframe_random_data..T)Zinplacerkr+rl)tmZmakeTimeDataFramegroupbysumr2Z set_levelslevelsZ set_names)ZtdfZymdrrr/multiindex_year_month_day_dataframe_random_dataas   rucCsltddddg}tddg}tjdddd d d g}tjddddddg}d d g}t||g||g|d d}|S)zJ MultiIndex used to test the general functionality of this object foobarbazZquxonetworr)r?secondF)rtcodesnamesZverify_integrity)rr0arrayr)Z major_axisZ minor_axisZ major_codesZ minor_codesZ index_namesmirrr_create_multiindexos rcCs.tjddgddgtjddddgd d d gd S) zB MultiIndex with a level that is a tzaware DatetimeIndex. r)r{ab20130101r|z US/Eastern)ZperiodstzryrzZthree)r)rZ from_productr.Z date_rangerrrr_create_mi_with_dt64tz_levelsrrjz US/Pacific)r rvrwrxr{r|)unicodestringdatetimez datetime-tzperiodrintZuintrangefloatboolZ categoricalintervalemptyZtupleszmi-with-dt64tz-levelZmultiZrepeatscCst|jjS)z Fixture for many "simple" kinds of indices. These indices are unlikely to cover corner cases, e.g. - no names - no NaTs/NaNs - no values near implementation bounds - ... ) indices_dictr9copy)r:rrrr2s cCstjggtjdS)N)r2dtype)r.Seriesr0Zfloat64rrrr empty_seriessrcCstj}d|_|S)zC Fixture for Series of floats with Index of unique strings rV)rqZmakeStringSeriesname)srrr string_seriessrcCstj}d|_|S)zI Fixture for Series of dtype object with Index of unique strings Zobjects)rqZmakeObjectSeriesr)rrrr object_seriessrcCstj}d|_|S)z9 Fixture for Series of floats with DatetimeIndex ts)rqZmakeTimeSeriesr)rrrrdatetime_seriessrcCs$t|}tjj|}tj||ddS)z Helper for the _series dict r)r2r)lenr0randomZrandnr.r)r2sizedatarrr_create_seriess rcCs"i|]\}}t|d|dqS)z series-with-z-index)r)roZindex_idr2rrr srcCst|S)zE Fixture for tests on series with changing types of indices. )r)r2rrrseries_with_simple_indexsrcCs(i|] }tjddj||jdqS)r)rz-series)rqZmakeFloatSeriesrnr])rorrrrrscCst|jjS)z: Fixture for Series with low precision data types )_narrow_seriesr9r)r:rrr narrow_seriessrcCst|jjddS)z| Fixture for tests on indexes, series and series with a narrow dtype copy to avoid mutation, e.g. setting .name T)deep)_index_or_series_objsr9r)r:rrrindex_or_series_objsrcCstS)N)r rrrr empty_framesrcCsttjjdS)a6 Fixture for DataFrame of ints with index of unique strings Columns are ['A', 'B', 'C', 'D'] A B C D vpBeWjM651 1 0 1 0 5JyxmrP1En -1 0 0 0 qEDaoD49U2 -1 1 0 0 m66TkTfsFe 0 0 0 0 EHPaNzEUFm -1 0 -1 0 fpRJCevQhi 2 0 0 0 OlQvnmfi3Q 0 0 -2 0 ... .. .. .. .. uB1FPlz4uP 0 0 0 1 EcSe6yNzCU 0 0 -1 0 L50VudaiI8 -1 1 -2 0 y3bpw4nwIp 0 -1 0 0 H0RdLLwrCT 1 1 0 0 rY82K0vMwm 0 0 0 0 1OPIUjnkjk 2 0 0 0 [30 rows x 4 columns] Zint64)r rq getSeriesDatarnrrrr int_frame srcCs ttjS)a Fixture for DataFrame of floats with DatetimeIndex Columns are ['A', 'B', 'C', 'D'] A B C D 2000-01-03 -1.122153 0.468535 0.122226 1.693711 2000-01-04 0.189378 0.486100 0.007864 -1.216052 2000-01-05 0.041401 -0.835752 -0.035279 -0.414357 2000-01-06 0.430050 0.894352 0.090719 0.036939 2000-01-07 -0.620982 -0.668211 -0.706153 1.466335 2000-01-10 -0.752633 0.328434 -0.815325 0.699674 2000-01-11 -2.236969 0.615737 -0.829076 -1.196106 ... ... ... ... ... 2000-02-03 1.642618 -0.579288 0.046005 1.385249 2000-02-04 -0.544873 -1.160962 -0.284071 -1.418351 2000-02-07 -2.656149 -0.601387 1.410148 0.444150 2000-02-08 -1.201881 -1.289040 0.772992 -1.445300 2000-02-09 1.377373 0.398619 1.008453 -0.928207 2000-02-10 0.473194 -0.636677 0.984058 0.511519 2000-02-11 -0.965556 0.408313 -1.312844 -0.381948 [30 rows x 4 columns] )r rqZgetTimeSeriesDatarrrrdatetime_frame=srcCs ttjS)a Fixture for DataFrame of floats with index of unique strings Columns are ['A', 'B', 'C', 'D']. A B C D P7GACiRnxd -0.465578 -0.361863 0.886172 -0.053465 qZKh6afn8n -0.466693 -0.373773 0.266873 1.673901 tkp0r6Qble 0.148691 -0.059051 0.174817 1.598433 wP70WOCtv8 0.133045 -0.581994 -0.992240 0.261651 M2AeYQMnCz -1.207959 -0.185775 0.588206 0.563938 QEPzyGDYDo -0.381843 -0.758281 0.502575 -0.565053 r78Jwns6dn -0.653707 0.883127 0.682199 0.206159 ... ... ... ... ... IHEGx9NO0T -0.277360 0.113021 -1.018314 0.196316 lPMj8K27FA -1.313667 -0.604776 -1.305618 -0.863999 qa66YMWQa5 1.110525 0.475310 -0.747865 0.032121 yOa0ATsmcE -0.431457 0.067094 0.096567 -0.264962 65znX3uRNG 1.528446 0.160416 -0.109635 -0.032987 eCOBvKqf3e 0.235281 1.622222 0.781255 0.392871 xSucinXxuV -1.263557 0.252799 -0.552247 0.400426 [30 rows x 4 columns] )r rqrrrrr float_frameZsr__add____radd____sub____rsub____mul____rmul__ __floordiv__ __rfloordiv__ __truediv__ __rtruediv____pow____rpow____mod____rmod__cCs|jS)zD Fixture for dunder names for common arithmetic operations. )r9)r:rrrall_arithmetic_operatorssrcCs|jS)z Fixture for operator and roperator arithmetic functions. Notes ----- This includes divmod and rdivmod, whereas all_arithmetic_operators does not. )r9)r:rrrall_arithmetic_functionssrrsmaxminZmeanprodZstdvarZmedianZkurtZskewcCs|jS)z. Fixture for numeric reduction names. )r9)r:rrrall_numeric_reductionssrallanycCs|jS)z. Fixture for boolean reduction names. )r9)r:rrrall_boolean_reductionssrcCs|jS)z> Fixture for all (boolean + numeric) reduction names. )r9)r:rrrall_reductionssr__eq____ne____le____lt____ge____gt__cCs|jS)zu Fixture for dunder names for common compare operations * >= * > * == * != * < * <= )r9)r:rrrall_compare_operatorss rcCs|jS)zm Fixture for dunder names for compare operations except == and != * >= * > * < * <= )r9)r:rrrcompare_operators_no_eq_nes r__and____rand____or____ror____xor____rxor__cCs|jS)zY Fixture for dunder names for common logical operations * | * & * ^ )r9)r:rrrall_logical_operatorss rcCs |jdS)zO Returns the configuration for the test setting `--strict-data-files`. z--strict-data-files)r)Z pytestconfigrrrstrict_data_files srcs(tjjtjjtdfdd}|S)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 --strict-data-files option is set. testscsJtjjf|}tjj|sFr4td|dntjd|d|S)NzCould not find file z and --strict-data-files is set.zCould not find .)ospathjoinexists ValueErrorrr )r[r) BASE_PATHrrrdeco(s zdatapath..deco)rrrdirname__file__)rrr)rrrdatapaths rcCstj|ddddS)z* The iris dataset as a DataFrame. iorcsvziris.csv)r.Zread_csv)rrrriris6srUTCz US/Easternz Asia/Tokyozdateutil/US/Pacificzdateutil/Asia/Singaporei,)hours)rcCsg|] }t|qSr)r4)roirrrrpQsrpcCs|jS)zD Fixture for trying timezones including default (None): {0} )r9)r:rrrtz_naive_fixtureTsrcCs|jS)z4 Fixture for trying explicit timezones: {0} )r9)r:rrrtz_aware_fixture]srmodule)ZscopecCstjS)zB Yields the UTC timezone object from the datetime module. )rr rrrrdatetime_tz_utcjsrr z dateutil/UTCcCs|jS)zQ Fixture to provide variants of UTC timezone strings and tzinfo objects. )r9)r:rrr utc_fixturersrcCs|jS)zR Parametrized fixture for string dtypes. * str * 'str' * 'U' )r9)r:rrr string_dtype}s rcCs|jS)zK Parametrized fixture for bytes dtypes. * bytes * 'bytes' )r9)r:rrr bytes_dtypesrcCs|jS)zN Parametrized fixture for object dtypes. * object * 'object' )r9)r:rrr object_dtypesrcCs|jS)z\ Parametrized fixture for datetime64 dtypes. * 'datetime64[ns]' * 'M8[ns]' )r9)r:rrrdatetime64_dtypesrcCs|jS)z^ Parametrized fixture for timedelta64 dtypes. * 'timedelta64[ns]' * 'm8[ns]' )r9)r:rrrtimedelta64_dtypesrcCs|jS)z^ Parameterized fixture for float dtypes. * float * 'float32' * 'float64' )r9)r:rrr float_dtypes rcCs|jS)zg Parameterized fixture for complex dtypes. * complex * 'complex64' * 'complex128' )r9)r:rrr complex_dtypes rcCs|jS)z| Parameterized fixture for signed integer dtypes. * int * 'int8' * 'int16' * 'int32' * 'int64' )r9)r:rrr sint_dtypes rcCs|jS)zx Parameterized fixture for unsigned integer dtypes. * 'uint8' * 'uint16' * 'uint32' * 'uint64' )r9)r:rrr uint_dtypes rcCs|jS)z Parameterized fixture for any integer dtype. * int * 'int8' * 'uint8' * 'int16' * 'uint16' * 'int32' * 'uint32' * 'int64' * 'uint64' )r9)r:rrr any_int_dtypesrcCs|jS)z Parameterized fixture for any nullable integer dtype. * 'UInt8' * 'Int8' * 'UInt16' * 'Int16' * 'UInt32' * 'Int32' * 'UInt64' * 'Int64' )r9)r:rrrany_nullable_int_dtypesrcCs|jS)z~ Parameterized fixture for any signed nullable integer dtype. * 'Int8' * 'Int16' * 'Int32' * 'Int64' )r9)r:rrrany_signed_nullable_int_dtype s rcCs|jS)z Parameterized fixture for any (purely) real numeric dtype. * int * 'int8' * 'uint8' * 'int16' * 'uint16' * 'int32' * 'uint32' * 'int64' * 'uint64' * float * 'float32' * 'float64' )r9)r:rrrany_real_dtypesrcCs|jS)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' )r9)r:rrrany_numpy_dtype-s"rrrcbytesacrz mixed-integermixedg@Zfloatingg?integerzmixed-integer-floatdecimalboolean datetime64z 2013-01-01z 2018-01-01rrZ20180101riirrrrcCs |j\}}tj|td}||fS)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 -------- >>> import pandas._libs.lib as 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)r9r0robject)r:Zinferred_dtypevaluesrrrany_skipna_inferred_dtypeps) rcCs tjdddddlm}|S)zj Get an instance of IPython.InteractiveShell. Will raise a skip if IPython is not installed. ZIPythonz6.0.0)Z minversionr)InteractiveShell)rZ importorskipZIPython.core.interactiveshellr )r rrrips r ZbsrZcooZcscZcsrZdiaZdokZlilcCsddlm}t||jdS)z- Yields scipy sparse matrix classes. r)sparseZ_matrix)Zscipyr getattrr9)r:r rrrspmatrixs r cCs|jS)z Yields a tuple of a function and its corresponding name. Correspond to the list of aggregator "Cython functions" used on selected table items. )r9)r:rrrcython_table_itemssrcCs.g|]&}tttj|tjjrttj|qSr) issubclassr r.offsetsZTick)roorrrrpscCs|jS)zN Fixture for Tick based datetime offsets available for a time series. )r9)r:rrr tick_classess rcCs|S)Nr)r5rrrr6scCs|jS)zk Simple fixture for testing keys in sorting methods. Tests None (no key) and the identity key. )r9)r:rrr sort_by_keysriii)__doc__ collectionsrrrrrrrroperatorrZ dateutil.tzrr Z hypothesisr stZnumpyr0rZpytzr r Zpandas.util._test_decoratorsutilZ_test_decoratorstdZpandasr.r Zpandas._testingZ_testingrqZ pandas.corerZpandas.core.indexes.apirrrrr"settingsZregister_profileZ HealthCheckZtoo_slowZ load_profilesplitrr ZtseriesrclsZregister_type_strategyZbuildsZintegersZbooleansZfixturer/r1r;Z axis_framer<r=r>rArDrErJrKrLrOrRrSZNaTrZNAstrrTZnulls_fixture2rUZunique_nulls_fixture2rrWZindex_or_series2rarirurrZmakeUnicodeIndexZmakeStringIndexZ makeDateIndexZmakePeriodIndexZmakeTimedeltaIndexZ makeIntIndexZ makeUIntIndexZmakeRangeIndexZmakeFloatIndexZ makeBoolIndexZmakeCategoricalIndexZmakeIntervalIndex from_tuplesrHrkeysr2Zindex_fixture2rrrrritemsZ_seriesrZfloat16Zfloat32Zint8Zint16Zint32Zuint8Zuint16Zuint32Z_narrow_dtypesrrrrrrrrZ_all_arithmetic_operatorsraddZraddsubZrsubmulZrmultruedivZrtruedivfloordivZ rfloordivmodZrmodpowZrpowrZ_all_numeric_reductionsrZ_all_boolean_reductionsrZ_all_reductionsrrrrrrrZ TIMEZONESZ TIMEZONE_IDSZparametrize_fixture_docrrZtz_aware_fixture2rrZ STRING_DTYPESrZ BYTES_DTYPESrZ OBJECT_DTYPESrZDATETIME64_DTYPESrZTIMEDELTA64_DTYPESrZ FLOAT_DTYPESrZCOMPLEX_DTYPESrZSIGNED_INT_DTYPESrZUNSIGNED_INT_DTYPESrZALL_INT_DTYPESrZALL_EA_INT_DTYPESrZSIGNED_EA_INT_DTYPESrZALL_REAL_DTYPESrZALL_NUMPY_DTYPESrr TimestampZPeriodZIntervalZ_any_skipna_inferred_dtyper8_rr r listZ cython_tabler__all__rrrrrrs         (   "    * "          !  #   ( "          '  $ $ 3 4