From 7f422d44d572c77933211352a489cab4d735f082 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 2 Dec 2018 22:42:45 +0800 Subject: [PATCH 01/19] Deprecate series.nonzero (GH18262) --- doc/source/whatsnew/v0.24.0.rst | 1 + pandas/core/series.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/doc/source/whatsnew/v0.24.0.rst b/doc/source/whatsnew/v0.24.0.rst index 3be87c4cabaf0..707d659df765b 100644 --- a/doc/source/whatsnew/v0.24.0.rst +++ b/doc/source/whatsnew/v0.24.0.rst @@ -1223,6 +1223,7 @@ Deprecations - The ``skipna`` parameter of :meth:`~pandas.api.types.infer_dtype` will switch to ``True`` by default in a future version of pandas (:issue:`17066`, :issue:`24050`) - In :meth:`Series.where` with Categorical data, providing an ``other`` that is not present in the categories is deprecated. Convert the categorical to a different dtype or add the ``other`` to the categories first (:issue:`24077`). - :meth:`Series.clip_lower`, :meth:`Series.clip_upper`, :meth:`DataFrame.clip_lower` and :meth:`DataFrame.clip_upper` are deprecated and will be removed in a future version. Use ``Series.clip(lower=threshold)``, ``Series.clip(upper=threshold)`` and the equivalent ``DataFrame`` methods (:issue:`24203`) +- :meth:`Series.nonzero` is deprecated and will be removed in a future version (:issue:`18262`) .. _whatsnew_0240.deprecations.datetimelike_int_ops: diff --git a/pandas/core/series.py b/pandas/core/series.py index de34227cda28a..d24f60a7cffad 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -542,6 +542,8 @@ def nonzero(self): """ Return the *integer* indices of the elements that are non-zero. + .. deprecated:: 0.24.0 + This method is equivalent to calling `numpy.nonzero` on the series data. For compatibility with NumPy, the return value is the same (a tuple with an array of indices for each dimension), @@ -571,6 +573,9 @@ def nonzero(self): d 4 dtype: int64 """ + msg = ("Series.nonzero() is deprecated " + "and will be removed in a future version.") + warnings.warn(msg, FutureWarning, stacklevel=2) return self._values.nonzero() def put(self, *args, **kwargs): From 54ea943b8b8a8a906f271ecfb17d4d34f7e7b727 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 18:33:17 +0800 Subject: [PATCH 02/19] Add test --- pandas/tests/series/test_missing.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/series/test_missing.py b/pandas/tests/series/test_missing.py index ffd21fb449864..57232aa0e04cb 100644 --- a/pandas/tests/series/test_missing.py +++ b/pandas/tests/series/test_missing.py @@ -1324,3 +1324,9 @@ def test_series_interpolate_intraday(self): result = ts.reindex(new_index).interpolate(method='time') tm.assert_numpy_array_equal(result.values, exp.values) + + def test_nonzero_warning(self): + # GH 24048 + ser = pd.Series([1, 0, 3, 4]) + with pytest.warns(FutureWarning, match="Series.nonzero()"): + ser.nonzero() From 481482fc56a273d87d733ccfe54ebcc436bee4ac Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 18:34:38 +0800 Subject: [PATCH 03/19] Update warning msg --- pandas/core/series.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index d24f60a7cffad..693843b6646ac 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -574,7 +574,8 @@ def nonzero(self): dtype: int64 """ msg = ("Series.nonzero() is deprecated " - "and will be removed in a future version.") + "and will be removed in a future version." + "Use np.nonzero() instead") warnings.warn(msg, FutureWarning, stacklevel=2) return self._values.nonzero() From 73f5132c9eb164171f233accaa46fccda2ec45a5 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 18:35:05 +0800 Subject: [PATCH 04/19] Get rid of nonzero() in dropna() --- pandas/core/frame.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a50def7357826..cc53aaf768798 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4589,7 +4589,10 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None, else: raise TypeError('must specify how or thresh') - result = self._take(mask.nonzero()[0], axis=axis) + if axis == 0: + result = self.loc[mask] + else: + result = self.loc[:, mask] if inplace: self._update_inplace(result) From 1126d3ac38e48e6b44003cf3dd122633d3ddd639 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 22:56:04 +0800 Subject: [PATCH 05/19] Get rid of series.nonzero() in drop_duplicate() --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index cc53aaf768798..8aa27ceb6e8b6 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4627,7 +4627,7 @@ def drop_duplicates(self, subset=None, keep='first', inplace=False): duplicated = self.duplicated(subset, keep=keep) if inplace: - inds, = (-duplicated).nonzero() + inds, = (-duplicated).values.nonzero() new_data = self._data.take(inds) self._update_inplace(new_data) else: From d9db2c4cfd278677cebd0208b47770ce641b3ae2 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 22:56:24 +0800 Subject: [PATCH 06/19] Update warning msg --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index 693843b6646ac..dce03a8368455 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -575,7 +575,7 @@ def nonzero(self): """ msg = ("Series.nonzero() is deprecated " "and will be removed in a future version." - "Use np.nonzero() instead") + "Use np.nonzero(Series.values) instead") warnings.warn(msg, FutureWarning, stacklevel=2) return self._values.nonzero() From d954d1d86984cadc0014161aec6b88d394ba87e8 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sun, 30 Dec 2018 23:08:34 +0800 Subject: [PATCH 07/19] Change the arg of np.argwhere --- pandas/io/stata.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index aad57fc489fb6..cc97ccf9780da 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -1629,7 +1629,8 @@ def _do_convert_missing(self, data, convert_missing): continue if convert_missing: # Replacement follows Stata notation - missing_loc = np.argwhere(missing) + + missing_loc = np.argwhere(missing.values) umissing, umissing_loc = np.unique(series[missing], return_inverse=True) replacement = Series(series, dtype=np.object) From cf64d0426cd0399f613df36bdc652fac47b88a4a Mon Sep 17 00:00:00 2001 From: makbigc Date: Tue, 1 Jan 2019 14:48:34 +0800 Subject: [PATCH 08/19] Remove Series.nonzero from api.rst --- doc/source/api.rst | 4115 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 4115 insertions(+) create mode 100644 doc/source/api.rst diff --git a/doc/source/api.rst b/doc/source/api.rst new file mode 100644 index 0000000000000..6aad64ff48b50 --- /dev/null +++ b/doc/source/api.rst @@ -0,0 +1,4115 @@ +.. The currentmodule is needed here because the autosummary generation of files +.. happens before reading the files / substituting the header. +.. See https://github.com/pandas-dev/pandas/pull/24232 + +.. currentmodule:: pandas + +.. _api: + +{{ header }} + +************* +API Reference +************* + +This page gives an overview of all public pandas objects, functions and +methods. All classes and functions exposed in ``pandas.*`` namespace are public. + +Some subpackages are public which include ``pandas.errors``, +``pandas.plotting``, and ``pandas.testing``. Public functions in +``pandas.io`` and ``pandas.tseries`` submodules are mentioned in +the documentation. ``pandas.api.types`` subpackage holds some +public functions related to data types in pandas. + + +.. warning:: + + The ``pandas.core``, ``pandas.compat``, and ``pandas.util`` top-level modules are PRIVATE. Stable functionality in such modules is not guaranteed. + + +.. _api.functions: + +Input/Output +------------ + +Pickling +~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_pickle + +Flat File +~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_table + read_csv + read_fwf + read_msgpack + +Clipboard +~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_clipboard + +Excel +~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_excel + ExcelFile.parse + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + ExcelWriter + +JSON +~~~~ + +.. autosummary:: + :toctree: generated/ + + read_json + +.. currentmodule:: pandas.io.json + +.. autosummary:: + :toctree: generated/ + + json_normalize + build_table_schema + +.. currentmodule:: pandas + +HTML +~~~~ + +.. autosummary:: + :toctree: generated/ + + read_html + +HDFStore: PyTables (HDF5) +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_hdf + HDFStore.put + HDFStore.append + HDFStore.get + HDFStore.select + HDFStore.info + HDFStore.keys + HDFStore.groups + HDFStore.walk + +Feather +~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_feather + +Parquet +~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_parquet + +SAS +~~~ + +.. autosummary:: + :toctree: generated/ + + read_sas + +SQL +~~~ + +.. autosummary:: + :toctree: generated/ + + read_sql_table + read_sql_query + read_sql + +Google BigQuery +~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_gbq + + +STATA +~~~~~ + +.. autosummary:: + :toctree: generated/ + + read_stata + +.. currentmodule:: pandas.io.stata + +.. autosummary:: + :toctree: generated/ + + StataReader.data + StataReader.data_label + StataReader.value_labels + StataReader.variable_labels + StataWriter.write_file + +.. currentmodule:: pandas + +General functions +----------------- + +Data manipulations +~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + melt + pivot + pivot_table + crosstab + cut + qcut + merge + merge_ordered + merge_asof + concat + get_dummies + factorize + unique + wide_to_long + +Top-level missing data +~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + isna + isnull + notna + notnull + +Top-level conversions +~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + to_numeric + +Top-level dealing with datetimelike +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + to_datetime + to_timedelta + date_range + bdate_range + period_range + timedelta_range + infer_freq + +Top-level dealing with intervals +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + interval_range + +Top-level evaluation +~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + eval + +Hashing +~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + util.hash_array + util.hash_pandas_object + +Testing +~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + test + +.. _api.series: + +Series +------ + +Constructor +~~~~~~~~~~~ + +.. currentmodule:: pandas + +.. autosummary:: + :toctree: generated/ + + Series + +Attributes +~~~~~~~~~~ +**Axes** + +.. autosummary:: + :toctree: generated/ + + Series.index + +.. autosummary:: + :toctree: generated/ + + Series.values + Series.dtype + Series.ftype + Series.shape + Series.nbytes + Series.ndim + Series.size + Series.strides + Series.itemsize + Series.base + Series.T + Series.memory_usage + Series.hasnans + Series.flags + Series.empty + Series.dtypes + Series.ftypes + Series.data + Series.is_copy + Series.name + Series.put + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.astype + Series.infer_objects + Series.convert_objects + Series.copy + Series.bool + Series.to_period + Series.to_timestamp + Series.to_list + Series.get_values + + +Indexing, iteration +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.get + Series.at + Series.iat + Series.loc + Series.iloc + Series.__iter__ + Series.iteritems + Series.items + Series.keys + Series.pop + Series.item + Series.xs + +For more information on ``.at``, ``.iat``, ``.loc``, and +``.iloc``, see the :ref:`indexing documentation `. + +Binary operator functions +~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.add + Series.sub + Series.mul + Series.div + Series.truediv + Series.floordiv + Series.mod + Series.pow + Series.radd + Series.rsub + Series.rmul + Series.rdiv + Series.rtruediv + Series.rfloordiv + Series.rmod + Series.rpow + Series.combine + Series.combine_first + Series.round + Series.lt + Series.gt + Series.le + Series.ge + Series.ne + Series.eq + Series.product + Series.dot + +Function application, GroupBy & Window +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.apply + Series.agg + Series.aggregate + Series.transform + Series.map + Series.groupby + Series.rolling + Series.expanding + Series.ewm + Series.pipe + +.. _api.series.stats: + +Computations / Descriptive Stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.abs + Series.all + Series.any + Series.autocorr + Series.between + Series.clip + Series.clip_lower + Series.clip_upper + Series.corr + Series.count + Series.cov + Series.cummax + Series.cummin + Series.cumprod + Series.cumsum + Series.describe + Series.diff + Series.factorize + Series.kurt + Series.mad + Series.max + Series.mean + Series.median + Series.min + Series.mode + Series.nlargest + Series.nsmallest + Series.pct_change + Series.prod + Series.quantile + Series.rank + Series.sem + Series.skew + Series.std + Series.sum + Series.var + Series.kurtosis + Series.unique + Series.nunique + Series.is_unique + Series.is_monotonic + Series.is_monotonic_increasing + Series.is_monotonic_decreasing + Series.value_counts + Series.compound + + +Reindexing / Selection / Label manipulation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.align + Series.drop + Series.droplevel + Series.drop_duplicates + Series.duplicated + Series.equals + Series.first + Series.head + Series.idxmax + Series.idxmin + Series.isin + Series.last + Series.reindex + Series.reindex_like + Series.rename + Series.rename_axis + Series.reset_index + Series.sample + Series.select + Series.set_axis + Series.take + Series.tail + Series.truncate + Series.where + Series.mask + Series.add_prefix + Series.add_suffix + Series.filter + +Missing data handling +~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.isna + Series.notna + Series.dropna + Series.fillna + Series.interpolate + +Reshaping, sorting +~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.argsort + Series.argmin + Series.argmax + Series.reorder_levels + Series.sort_values + Series.sort_index + Series.swaplevel + Series.unstack + Series.searchsorted + Series.ravel + Series.repeat + Series.squeeze + Series.view + + +Combining / joining / merging +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.append + Series.replace + Series.update + +Time series-related +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.asfreq + Series.asof + Series.shift + Series.first_valid_index + Series.last_valid_index + Series.resample + Series.tz_convert + Series.tz_localize + Series.at_time + Series.between_time + Series.tshift + Series.slice_shift + +Datetimelike Properties +~~~~~~~~~~~~~~~~~~~~~~~ + +``Series.dt`` can be used to access the values of the series as +datetimelike and return several properties. +These can be accessed like ``Series.dt.``. + +**Datetime Properties** + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_attribute.rst + + Series.dt.date + Series.dt.time + Series.dt.timetz + Series.dt.year + Series.dt.month + Series.dt.day + Series.dt.hour + Series.dt.minute + Series.dt.second + Series.dt.microsecond + Series.dt.nanosecond + Series.dt.week + Series.dt.weekofyear + Series.dt.dayofweek + Series.dt.weekday + Series.dt.dayofyear + Series.dt.quarter + Series.dt.is_month_start + Series.dt.is_month_end + Series.dt.is_quarter_start + Series.dt.is_quarter_end + Series.dt.is_year_start + Series.dt.is_year_end + Series.dt.is_leap_year + Series.dt.daysinmonth + Series.dt.days_in_month + Series.dt.tz + Series.dt.freq + +**Datetime Methods** + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + Series.dt.to_period + Series.dt.to_pydatetime + Series.dt.tz_localize + Series.dt.tz_convert + Series.dt.normalize + Series.dt.strftime + Series.dt.round + Series.dt.floor + Series.dt.ceil + Series.dt.month_name + Series.dt.day_name + +**Period Properties** + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_attribute.rst + + Series.dt.qyear + Series.dt.start_time + Series.dt.end_time + +**Timedelta Properties** + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_attribute.rst + + Series.dt.days + Series.dt.seconds + Series.dt.microseconds + Series.dt.nanoseconds + Series.dt.components + +**Timedelta Methods** + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + Series.dt.to_pytimedelta + Series.dt.total_seconds + +String handling +~~~~~~~~~~~~~~~ +``Series.str`` can be used to access the values of the series as +strings and apply several methods to it. These can be accessed like +``Series.str.``. + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + Series.str.capitalize + Series.str.cat + Series.str.center + Series.str.contains + Series.str.count + Series.str.decode + Series.str.encode + Series.str.endswith + Series.str.extract + Series.str.extractall + Series.str.find + Series.str.findall + Series.str.get + Series.str.index + Series.str.join + Series.str.len + Series.str.ljust + Series.str.lower + Series.str.lstrip + Series.str.match + Series.str.normalize + Series.str.pad + Series.str.partition + Series.str.repeat + Series.str.replace + Series.str.rfind + Series.str.rindex + Series.str.rjust + Series.str.rpartition + Series.str.rstrip + Series.str.slice + Series.str.slice_replace + Series.str.split + Series.str.rsplit + Series.str.startswith + Series.str.strip + Series.str.swapcase + Series.str.title + Series.str.translate + Series.str.upper + Series.str.wrap + Series.str.zfill + Series.str.isalnum + Series.str.isalpha + Series.str.isdigit + Series.str.isspace + Series.str.islower + Series.str.isupper + Series.str.istitle + Series.str.isnumeric + Series.str.isdecimal + Series.str.get_dummies + +.. + The following is needed to ensure the generated pages are created with the + correct template (otherwise they would be created in the Series/Index class page) + +.. + .. autosummary:: + :toctree: generated/ + :template: autosummary/accessor.rst + + Series.str + Series.cat + Series.dt + Index.str + + +.. _api.arrays: + +Arrays +------ + +Pandas and third-party libraries can extend NumPy's type system (see :ref:`extending.extension-types`). + +.. autosummary:: + :toctree: generated/ + + array + +.. _api.categorical: + +Categorical +~~~~~~~~~~~ + +Pandas defines a custom data type for representing data that can take only a +limited, fixed set of values. The dtype of a ``Categorical`` can be described by +a :class:`pandas.api.types.CategoricalDtype`. + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + api.types.CategoricalDtype + +.. autosummary:: + :toctree: generated/ + + api.types.CategoricalDtype.categories + api.types.CategoricalDtype.ordered + +Categorical data can be stored in a :class:`pandas.Categorical` + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + Categorical + + +The alternative :meth:`Categorical.from_codes` constructor can be used when you +have the categories and integer codes already: + +.. autosummary:: + :toctree: generated/ + + Categorical.from_codes + +The dtype information is available on the ``Categorical`` + +.. autosummary:: + :toctree: generated/ + + Categorical.dtype + Categorical.categories + Categorical.ordered + Categorical.codes + +``np.asarray(categorical)`` works by implementing the array interface. Be aware, that this converts +the Categorical back to a NumPy array, so categories and order information is not preserved! + +.. autosummary:: + :toctree: generated/ + + Categorical.__array__ + +A ``Categorical`` can be stored in a ``Series`` or ``DataFrame``. +To create a Series of dtype ``category``, use ``cat = s.astype(dtype)`` or +``Series(..., dtype=dtype)`` where ``dtype`` is either + +* the string ``'category'`` +* an instance of :class:`~pandas.api.types.CategoricalDtype`. + +If the Series is of dtype ``CategoricalDtype``, ``Series.cat`` can be used to change the categorical +data. This accessor is similar to the ``Series.dt`` or ``Series.str`` and has the +following usable methods and properties: + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_attribute.rst + + Series.cat.categories + Series.cat.ordered + Series.cat.codes + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + Series.cat.rename_categories + Series.cat.reorder_categories + Series.cat.add_categories + Series.cat.remove_categories + Series.cat.remove_unused_categories + Series.cat.set_categories + Series.cat.as_ordered + Series.cat.as_unordered + +.. _api.arrays.integerna: + +Integer-NA +~~~~~~~~~~ + +:class:`arrays.IntegerArray` can hold integer data, potentially with missing +values. + +.. autosummary:: + :toctree: generated/ + + arrays.IntegerArray + +.. _api.arrays.interval: + +Interval +~~~~~~~~ + +:class:`IntervalArray` is an array for storing data representing intervals. +The scalar type is a :class:`Interval`. These may be stored in a :class:`Series` +or as a :class:`IntervalIndex`. :class:`IntervalArray` can be closed on the +``'left'``, ``'right'``, or ``'both'``, or ``'neither'`` sides. +See :ref:`indexing.intervallindex` for more. + +.. currentmodule:: pandas + +.. autosummary:: + :toctree: generated/ + + IntervalArray + +.. _api.arrays.period: + +Period +~~~~~~ + +Periods represent a span of time (e.g. the year 2000, or the hour from 11:00 to 12:00 +on January 1st, 2000). A collection of :class:`Period` objects with a common frequency +can be collected in a :class:`PeriodArray`. See :ref:`timeseries.periods` for more. + +.. autosummary:: + :toctree: generated/ + + arrays.PeriodArray + +Sparse +~~~~~~ + +Sparse data may be stored and operated on more efficiently when there is a single value +that's often repeated. :class:`SparseArray` is a container for this type of data. +See :ref:`sparse` for more. + +.. _api.arrays.sparse: + +.. autosummary:: + :toctree: generated/ + + SparseArray + +Plotting +~~~~~~~~ + +``Series.plot`` is both a callable method and a namespace attribute for +specific plotting methods of the form ``Series.plot.``. + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_callable.rst + + Series.plot + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + Series.plot.area + Series.plot.bar + Series.plot.barh + Series.plot.box + Series.plot.density + Series.plot.hist + Series.plot.kde + Series.plot.line + Series.plot.pie + +.. autosummary:: + :toctree: generated/ + + Series.hist + +Serialization / IO / Conversion +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Series.to_pickle + Series.to_csv + Series.to_dict + Series.to_excel + Series.to_frame + Series.to_xarray + Series.to_hdf + Series.to_sql + Series.to_msgpack + Series.to_json + Series.to_sparse + Series.to_dense + Series.to_string + Series.to_clipboard + Series.to_latex + +Sparse +~~~~~~ +.. autosummary:: + :toctree: generated/ + + SparseSeries.to_coo + SparseSeries.from_coo + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_attribute.rst + + Series.sparse.npoints + Series.sparse.density + Series.sparse.fill_value + Series.sparse.sp_values + + +.. autosummary:: + :toctree: generated/ + + Series.sparse.from_coo + Series.sparse.to_coo + +.. _api.dataframe: + +DataFrame +--------- + +Constructor +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame + +Attributes and underlying data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**Axes** + +.. autosummary:: + :toctree: generated/ + + DataFrame.index + DataFrame.columns + +.. autosummary:: + :toctree: generated/ + + DataFrame.dtypes + DataFrame.ftypes + DataFrame.get_dtype_counts + DataFrame.get_ftype_counts + DataFrame.select_dtypes + DataFrame.values + DataFrame.get_values + DataFrame.axes + DataFrame.ndim + DataFrame.size + DataFrame.shape + DataFrame.memory_usage + DataFrame.empty + DataFrame.is_copy + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.astype + DataFrame.convert_objects + DataFrame.infer_objects + DataFrame.copy + DataFrame.isna + DataFrame.notna + DataFrame.bool + +Indexing, iteration +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.head + DataFrame.at + DataFrame.iat + DataFrame.loc + DataFrame.iloc + DataFrame.insert + DataFrame.__iter__ + DataFrame.items + DataFrame.keys + DataFrame.iteritems + DataFrame.iterrows + DataFrame.itertuples + DataFrame.lookup + DataFrame.pop + DataFrame.tail + DataFrame.xs + DataFrame.get + DataFrame.isin + DataFrame.where + DataFrame.mask + DataFrame.query + +For more information on ``.at``, ``.iat``, ``.loc``, and +``.iloc``, see the :ref:`indexing documentation `. + + +Binary operator functions +~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.add + DataFrame.sub + DataFrame.mul + DataFrame.div + DataFrame.truediv + DataFrame.floordiv + DataFrame.mod + DataFrame.pow + DataFrame.dot + DataFrame.radd + DataFrame.rsub + DataFrame.rmul + DataFrame.rdiv + DataFrame.rtruediv + DataFrame.rfloordiv + DataFrame.rmod + DataFrame.rpow + DataFrame.lt + DataFrame.gt + DataFrame.le + DataFrame.ge + DataFrame.ne + DataFrame.eq + DataFrame.combine + DataFrame.combine_first + +Function application, GroupBy & Window +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.apply + DataFrame.applymap + DataFrame.pipe + DataFrame.agg + DataFrame.aggregate + DataFrame.transform + DataFrame.groupby + DataFrame.rolling + DataFrame.expanding + DataFrame.ewm + +.. _api.dataframe.stats: + +Computations / Descriptive Stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.abs + DataFrame.all + DataFrame.any + DataFrame.clip + DataFrame.clip_lower + DataFrame.clip_upper + DataFrame.compound + DataFrame.corr + DataFrame.corrwith + DataFrame.count + DataFrame.cov + DataFrame.cummax + DataFrame.cummin + DataFrame.cumprod + DataFrame.cumsum + DataFrame.describe + DataFrame.diff + DataFrame.eval + DataFrame.kurt + DataFrame.kurtosis + DataFrame.mad + DataFrame.max + DataFrame.mean + DataFrame.median + DataFrame.min + DataFrame.mode + DataFrame.pct_change + DataFrame.prod + DataFrame.product + DataFrame.quantile + DataFrame.rank + DataFrame.round + DataFrame.sem + DataFrame.skew + DataFrame.sum + DataFrame.std + DataFrame.var + DataFrame.nunique + +Reindexing / Selection / Label manipulation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.add_prefix + DataFrame.add_suffix + DataFrame.align + DataFrame.at_time + DataFrame.between_time + DataFrame.drop + DataFrame.drop_duplicates + DataFrame.duplicated + DataFrame.equals + DataFrame.filter + DataFrame.first + DataFrame.head + DataFrame.idxmax + DataFrame.idxmin + DataFrame.last + DataFrame.reindex + DataFrame.reindex_axis + DataFrame.reindex_like + DataFrame.rename + DataFrame.rename_axis + DataFrame.reset_index + DataFrame.sample + DataFrame.select + DataFrame.set_axis + DataFrame.set_index + DataFrame.tail + DataFrame.take + DataFrame.truncate + +.. _api.dataframe.missing: + +Missing data handling +~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.dropna + DataFrame.fillna + DataFrame.replace + DataFrame.interpolate + +Reshaping, sorting, transposing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.droplevel + DataFrame.pivot + DataFrame.pivot_table + DataFrame.reorder_levels + DataFrame.sort_values + DataFrame.sort_index + DataFrame.nlargest + DataFrame.nsmallest + DataFrame.swaplevel + DataFrame.stack + DataFrame.unstack + DataFrame.swapaxes + DataFrame.melt + DataFrame.squeeze + DataFrame.to_panel + DataFrame.to_xarray + DataFrame.T + DataFrame.transpose + +Combining / joining / merging +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.append + DataFrame.assign + DataFrame.join + DataFrame.merge + DataFrame.update + +Time series-related +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.asfreq + DataFrame.asof + DataFrame.shift + DataFrame.slice_shift + DataFrame.tshift + DataFrame.first_valid_index + DataFrame.last_valid_index + DataFrame.resample + DataFrame.to_period + DataFrame.to_timestamp + DataFrame.tz_convert + DataFrame.tz_localize + +.. _api.dataframe.plotting: + +Plotting +~~~~~~~~ + +``DataFrame.plot`` is both a callable method and a namespace attribute for +specific plotting methods of the form ``DataFrame.plot.``. + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_callable.rst + + DataFrame.plot + +.. autosummary:: + :toctree: generated/ + :template: autosummary/accessor_method.rst + + DataFrame.plot.area + DataFrame.plot.bar + DataFrame.plot.barh + DataFrame.plot.box + DataFrame.plot.density + DataFrame.plot.hexbin + DataFrame.plot.hist + DataFrame.plot.kde + DataFrame.plot.line + DataFrame.plot.pie + DataFrame.plot.scatter + +.. autosummary:: + :toctree: generated/ + + DataFrame.boxplot + DataFrame.hist + +Serialization / IO / Conversion +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DataFrame.from_csv + DataFrame.from_dict + DataFrame.from_items + DataFrame.from_records + DataFrame.info + DataFrame.to_parquet + DataFrame.to_pickle + DataFrame.to_csv + DataFrame.to_hdf + DataFrame.to_sql + DataFrame.to_dict + DataFrame.to_excel + DataFrame.to_json + DataFrame.to_html + DataFrame.to_feather + DataFrame.to_latex + DataFrame.to_stata + DataFrame.to_msgpack + DataFrame.to_gbq + DataFrame.to_records + DataFrame.to_sparse + DataFrame.to_dense + DataFrame.to_string + DataFrame.to_clipboard + DataFrame.style + +Sparse +~~~~~~ +.. autosummary:: + :toctree: generated/ + + SparseDataFrame.to_coo + +.. _api.panel: + +Panel +------ + +Constructor +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel + +Attributes and underlying data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +**Axes** + +* **items**: axis 0; each item corresponds to a DataFrame contained inside +* **major_axis**: axis 1; the index (rows) of each of the DataFrames +* **minor_axis**: axis 2; the columns of each of the DataFrames + +.. autosummary:: + :toctree: generated/ + + Panel.values + Panel.axes + Panel.ndim + Panel.size + Panel.shape + Panel.dtypes + Panel.ftypes + Panel.get_dtype_counts + Panel.get_ftype_counts + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.astype + Panel.copy + Panel.isna + Panel.notna + +Getting and setting +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.get_value + Panel.set_value + +Indexing, iteration, slicing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.at + Panel.iat + Panel.loc + Panel.iloc + Panel.__iter__ + Panel.iteritems + Panel.pop + Panel.xs + Panel.major_xs + Panel.minor_xs + +For more information on ``.at``, ``.iat``, ``.loc``, and +``.iloc``, see the :ref:`indexing documentation `. + +Binary operator functions +~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.add + Panel.sub + Panel.mul + Panel.div + Panel.truediv + Panel.floordiv + Panel.mod + Panel.pow + Panel.radd + Panel.rsub + Panel.rmul + Panel.rdiv + Panel.rtruediv + Panel.rfloordiv + Panel.rmod + Panel.rpow + Panel.lt + Panel.gt + Panel.le + Panel.ge + Panel.ne + Panel.eq + +Function application, GroupBy +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.apply + Panel.groupby + +.. _api.panel.stats: + +Computations / Descriptive Stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.abs + Panel.clip + Panel.clip_lower + Panel.clip_upper + Panel.count + Panel.cummax + Panel.cummin + Panel.cumprod + Panel.cumsum + Panel.max + Panel.mean + Panel.median + Panel.min + Panel.pct_change + Panel.prod + Panel.sem + Panel.skew + Panel.sum + Panel.std + Panel.var + + +Reindexing / Selection / Label manipulation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.add_prefix + Panel.add_suffix + Panel.drop + Panel.equals + Panel.filter + Panel.first + Panel.last + Panel.reindex + Panel.reindex_axis + Panel.reindex_like + Panel.rename + Panel.sample + Panel.select + Panel.take + Panel.truncate + + +Missing data handling +~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.dropna + +Reshaping, sorting, transposing +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.sort_index + Panel.swaplevel + Panel.transpose + Panel.swapaxes + Panel.conform + +Combining / joining / merging +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.join + Panel.update + +Time series-related +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.asfreq + Panel.shift + Panel.resample + Panel.tz_convert + Panel.tz_localize + +Serialization / IO / Conversion +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Panel.from_dict + Panel.to_pickle + Panel.to_excel + Panel.to_hdf + Panel.to_sparse + Panel.to_frame + Panel.to_clipboard + +.. _api.index: + +Index +----- + +**Many of these methods or variants thereof are available on the objects +that contain an index (Series/DataFrame) and those should most likely be +used before calling these methods directly.** + +.. autosummary:: + :toctree: generated/ + + Index + +Attributes +~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + Index.values + Index.is_monotonic + Index.is_monotonic_increasing + Index.is_monotonic_decreasing + Index.is_unique + Index.has_duplicates + Index.hasnans + Index.dtype + Index.dtype_str + Index.inferred_type + Index.is_all_dates + Index.shape + Index.name + Index.names + Index.nbytes + Index.ndim + Index.size + Index.empty + Index.strides + Index.itemsize + Index.base + Index.T + Index.memory_usage + +Modifying and Computations +~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.all + Index.any + Index.argmin + Index.argmax + Index.copy + Index.delete + Index.drop + Index.drop_duplicates + Index.duplicated + Index.equals + Index.factorize + Index.identical + Index.insert + Index.is_ + Index.is_boolean + Index.is_categorical + Index.is_floating + Index.is_integer + Index.is_interval + Index.is_mixed + Index.is_numeric + Index.is_object + Index.min + Index.max + Index.reindex + Index.rename + Index.repeat + Index.where + Index.take + Index.putmask + Index.unique + Index.nunique + Index.value_counts + +Compatibility with MultiIndex +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.set_names + Index.is_lexsorted_for_tuple + Index.droplevel + +Missing Values +~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.fillna + Index.dropna + Index.isna + Index.notna + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.astype + Index.item + Index.map + Index.ravel + Index.to_list + Index.to_native_types + Index.to_series + Index.to_frame + Index.view + +Sorting +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.argsort + Index.searchsorted + Index.sort_values + +Time-specific operations +~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.shift + +Combining / joining / set operations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.append + Index.join + Index.intersection + Index.union + Index.difference + Index.symmetric_difference + +Selecting +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Index.asof + Index.asof_locs + Index.contains + Index.get_duplicates + Index.get_indexer + Index.get_indexer_for + Index.get_indexer_non_unique + Index.get_level_values + Index.get_loc + Index.get_slice_bound + Index.get_value + Index.get_values + Index.set_value + Index.isin + Index.slice_indexer + Index.slice_locs + +.. _api.numericindex: + +Numeric Index +------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + RangeIndex + Int64Index + UInt64Index + Float64Index + +.. We need this autosummary so that the methods are generated. +.. Separate block, since they aren't classes. + +.. autosummary:: + :toctree: generated/ + + RangeIndex.from_range + + +.. _api.categoricalindex: + +CategoricalIndex +---------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + CategoricalIndex + +Categorical Components +~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + CategoricalIndex.codes + CategoricalIndex.categories + CategoricalIndex.ordered + CategoricalIndex.rename_categories + CategoricalIndex.reorder_categories + CategoricalIndex.add_categories + CategoricalIndex.remove_categories + CategoricalIndex.remove_unused_categories + CategoricalIndex.set_categories + CategoricalIndex.as_ordered + CategoricalIndex.as_unordered + +Modifying and Computations +~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CategoricalIndex.map + CategoricalIndex.equals + +.. _api.intervalindex: + +IntervalIndex +------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + IntervalIndex + +IntervalIndex Components +~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + IntervalIndex.from_arrays + IntervalIndex.from_tuples + IntervalIndex.from_breaks + IntervalIndex.contains + IntervalIndex.left + IntervalIndex.right + IntervalIndex.mid + IntervalIndex.closed + IntervalIndex.length + IntervalIndex.values + IntervalIndex.is_non_overlapping_monotonic + IntervalIndex.is_overlapping + IntervalIndex.get_loc + IntervalIndex.get_indexer + IntervalIndex.set_closed + IntervalIndex.overlaps + IntervalArray.to_tuples + + +.. _api.multiindex: + +MultiIndex +---------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + MultiIndex + +.. autosummary:: + :toctree: generated/ + + IndexSlice + +MultiIndex Constructors +~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + MultiIndex.from_arrays + MultiIndex.from_tuples + MultiIndex.from_product + MultiIndex.from_frame + +MultiIndex Attributes +~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + MultiIndex.names + MultiIndex.levels + MultiIndex.codes + MultiIndex.nlevels + MultiIndex.levshape + +MultiIndex Components +~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + MultiIndex.set_levels + MultiIndex.set_codes + MultiIndex.to_hierarchical + MultiIndex.to_flat_index + MultiIndex.to_frame + MultiIndex.is_lexsorted + MultiIndex.sortlevel + MultiIndex.droplevel + MultiIndex.swaplevel + MultiIndex.reorder_levels + MultiIndex.remove_unused_levels + +MultiIndex Selecting +~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + MultiIndex.get_loc + MultiIndex.get_loc_level + MultiIndex.get_indexer + MultiIndex.get_level_values + +.. _api.datetimeindex: + +DatetimeIndex +------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + DatetimeIndex + +Time/Date Components +~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + DatetimeIndex.year + DatetimeIndex.month + DatetimeIndex.day + DatetimeIndex.hour + DatetimeIndex.minute + DatetimeIndex.second + DatetimeIndex.microsecond + DatetimeIndex.nanosecond + DatetimeIndex.date + DatetimeIndex.time + DatetimeIndex.timetz + DatetimeIndex.dayofyear + DatetimeIndex.weekofyear + DatetimeIndex.week + DatetimeIndex.dayofweek + DatetimeIndex.weekday + DatetimeIndex.quarter + DatetimeIndex.tz + DatetimeIndex.freq + DatetimeIndex.freqstr + DatetimeIndex.is_month_start + DatetimeIndex.is_month_end + DatetimeIndex.is_quarter_start + DatetimeIndex.is_quarter_end + DatetimeIndex.is_year_start + DatetimeIndex.is_year_end + DatetimeIndex.is_leap_year + DatetimeIndex.inferred_freq + +Selecting +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DatetimeIndex.indexer_at_time + DatetimeIndex.indexer_between_time + + +Time-specific operations +~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DatetimeIndex.normalize + DatetimeIndex.strftime + DatetimeIndex.snap + DatetimeIndex.tz_convert + DatetimeIndex.tz_localize + DatetimeIndex.round + DatetimeIndex.floor + DatetimeIndex.ceil + DatetimeIndex.month_name + DatetimeIndex.day_name + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DatetimeIndex.to_period + DatetimeIndex.to_perioddelta + DatetimeIndex.to_pydatetime + DatetimeIndex.to_series + DatetimeIndex.to_frame + +TimedeltaIndex +-------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + TimedeltaIndex + +Components +~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + TimedeltaIndex.days + TimedeltaIndex.seconds + TimedeltaIndex.microseconds + TimedeltaIndex.nanoseconds + TimedeltaIndex.components + TimedeltaIndex.inferred_freq + +Conversion +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + TimedeltaIndex.to_pytimedelta + TimedeltaIndex.to_series + TimedeltaIndex.round + TimedeltaIndex.floor + TimedeltaIndex.ceil + TimedeltaIndex.to_frame + +.. currentmodule:: pandas + +PeriodIndex +-------------- + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + PeriodIndex + +Attributes +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + PeriodIndex.day + PeriodIndex.dayofweek + PeriodIndex.dayofyear + PeriodIndex.days_in_month + PeriodIndex.daysinmonth + PeriodIndex.end_time + PeriodIndex.freq + PeriodIndex.freqstr + PeriodIndex.hour + PeriodIndex.is_leap_year + PeriodIndex.minute + PeriodIndex.month + PeriodIndex.quarter + PeriodIndex.qyear + PeriodIndex.second + PeriodIndex.start_time + PeriodIndex.week + PeriodIndex.weekday + PeriodIndex.weekofyear + PeriodIndex.year + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + PeriodIndex.asfreq + PeriodIndex.strftime + PeriodIndex.to_timestamp + +.. api.scalars: + +Scalars +------- + +Period +~~~~~~ +.. autosummary:: + :toctree: generated/ + + Period + +Attributes +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Period.day + Period.dayofweek + Period.dayofyear + Period.days_in_month + Period.daysinmonth + Period.end_time + Period.freq + Period.freqstr + Period.hour + Period.is_leap_year + Period.minute + Period.month + Period.ordinal + Period.quarter + Period.qyear + Period.second + Period.start_time + Period.week + Period.weekday + Period.weekofyear + Period.year + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Period.asfreq + Period.now + Period.strftime + Period.to_timestamp + +Timestamp +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timestamp + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timestamp.asm8 + Timestamp.day + Timestamp.dayofweek + Timestamp.dayofyear + Timestamp.days_in_month + Timestamp.daysinmonth + Timestamp.fold + Timestamp.hour + Timestamp.is_leap_year + Timestamp.is_month_end + Timestamp.is_month_start + Timestamp.is_quarter_end + Timestamp.is_quarter_start + Timestamp.is_year_end + Timestamp.is_year_start + Timestamp.max + Timestamp.microsecond + Timestamp.min + Timestamp.minute + Timestamp.month + Timestamp.nanosecond + Timestamp.quarter + Timestamp.resolution + Timestamp.second + Timestamp.tz + Timestamp.tzinfo + Timestamp.value + Timestamp.week + Timestamp.weekofyear + Timestamp.year + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timestamp.astimezone + Timestamp.ceil + Timestamp.combine + Timestamp.ctime + Timestamp.date + Timestamp.day_name + Timestamp.dst + Timestamp.floor + Timestamp.freq + Timestamp.freqstr + Timestamp.fromordinal + Timestamp.fromtimestamp + Timestamp.isocalendar + Timestamp.isoformat + Timestamp.isoweekday + Timestamp.month_name + Timestamp.normalize + Timestamp.now + Timestamp.replace + Timestamp.round + Timestamp.strftime + Timestamp.strptime + Timestamp.time + Timestamp.timestamp + Timestamp.timetuple + Timestamp.timetz + Timestamp.to_datetime64 + Timestamp.to_julian_date + Timestamp.to_period + Timestamp.to_pydatetime + Timestamp.today + Timestamp.toordinal + Timestamp.tz_convert + Timestamp.tz_localize + Timestamp.tzname + Timestamp.utcfromtimestamp + Timestamp.utcnow + Timestamp.utcoffset + Timestamp.utctimetuple + Timestamp.weekday + +Interval +~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Interval + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Interval.closed + Interval.closed_left + Interval.closed_right + Interval.left + Interval.length + Interval.mid + Interval.open_left + Interval.open_right + Interval.overlaps + Interval.right + +Timedelta +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timedelta + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timedelta.asm8 + Timedelta.components + Timedelta.days + Timedelta.delta + Timedelta.freq + Timedelta.is_populated + Timedelta.max + Timedelta.microseconds + Timedelta.min + Timedelta.nanoseconds + Timedelta.resolution + Timedelta.seconds + Timedelta.value + Timedelta.view + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Timedelta.ceil + Timedelta.floor + Timedelta.isoformat + Timedelta.round + Timedelta.to_pytimedelta + Timedelta.to_timedelta64 + Timedelta.total_seconds + +.. _api.dateoffsets: + +Date Offsets +------------ + +.. currentmodule:: pandas.tseries.offsets + +DateOffset +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DateOffset + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DateOffset.freqstr + DateOffset.kwds + DateOffset.name + DateOffset.nanos + DateOffset.normalize + DateOffset.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + DateOffset.apply + DateOffset.copy + DateOffset.isAnchored + DateOffset.onOffset + +BusinessDay +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessDay + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessDay.freqstr + BusinessDay.kwds + BusinessDay.name + BusinessDay.nanos + BusinessDay.normalize + BusinessDay.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessDay.apply + BusinessDay.apply_index + BusinessDay.copy + BusinessDay.isAnchored + BusinessDay.onOffset + +BusinessHour +~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessHour + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessHour.freqstr + BusinessHour.kwds + BusinessHour.name + BusinessHour.nanos + BusinessHour.normalize + BusinessHour.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessHour.apply + BusinessHour.copy + BusinessHour.isAnchored + BusinessHour.onOffset + +CustomBusinessDay +~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessDay + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessDay.freqstr + CustomBusinessDay.kwds + CustomBusinessDay.name + CustomBusinessDay.nanos + CustomBusinessDay.normalize + CustomBusinessDay.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessDay.apply + CustomBusinessDay.copy + CustomBusinessDay.isAnchored + CustomBusinessDay.onOffset + +CustomBusinessHour +~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessHour + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessHour.freqstr + CustomBusinessHour.kwds + CustomBusinessHour.name + CustomBusinessHour.nanos + CustomBusinessHour.normalize + CustomBusinessHour.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessHour.apply + CustomBusinessHour.copy + CustomBusinessHour.isAnchored + CustomBusinessHour.onOffset + +MonthOffset +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthOffset + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthOffset.freqstr + MonthOffset.kwds + MonthOffset.name + MonthOffset.nanos + MonthOffset.normalize + MonthOffset.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthOffset.apply + MonthOffset.apply_index + MonthOffset.copy + MonthOffset.isAnchored + MonthOffset.onOffset + +MonthEnd +~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthEnd.freqstr + MonthEnd.kwds + MonthEnd.name + MonthEnd.nanos + MonthEnd.normalize + MonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthEnd.apply + MonthEnd.apply_index + MonthEnd.copy + MonthEnd.isAnchored + MonthEnd.onOffset + +MonthBegin +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthBegin.freqstr + MonthBegin.kwds + MonthBegin.name + MonthBegin.nanos + MonthBegin.normalize + MonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + MonthBegin.apply + MonthBegin.apply_index + MonthBegin.copy + MonthBegin.isAnchored + MonthBegin.onOffset + +BusinessMonthEnd +~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthEnd.freqstr + BusinessMonthEnd.kwds + BusinessMonthEnd.name + BusinessMonthEnd.nanos + BusinessMonthEnd.normalize + BusinessMonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthEnd.apply + BusinessMonthEnd.apply_index + BusinessMonthEnd.copy + BusinessMonthEnd.isAnchored + BusinessMonthEnd.onOffset + +BusinessMonthBegin +~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthBegin.freqstr + BusinessMonthBegin.kwds + BusinessMonthBegin.name + BusinessMonthBegin.nanos + BusinessMonthBegin.normalize + BusinessMonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BusinessMonthBegin.apply + BusinessMonthBegin.apply_index + BusinessMonthBegin.copy + BusinessMonthBegin.isAnchored + BusinessMonthBegin.onOffset + +CustomBusinessMonthEnd +~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthEnd.freqstr + CustomBusinessMonthEnd.kwds + CustomBusinessMonthEnd.m_offset + CustomBusinessMonthEnd.name + CustomBusinessMonthEnd.nanos + CustomBusinessMonthEnd.normalize + CustomBusinessMonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthEnd.apply + CustomBusinessMonthEnd.copy + CustomBusinessMonthEnd.isAnchored + CustomBusinessMonthEnd.onOffset + +CustomBusinessMonthBegin +~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthBegin.freqstr + CustomBusinessMonthBegin.kwds + CustomBusinessMonthBegin.m_offset + CustomBusinessMonthBegin.name + CustomBusinessMonthBegin.nanos + CustomBusinessMonthBegin.normalize + CustomBusinessMonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CustomBusinessMonthBegin.apply + CustomBusinessMonthBegin.copy + CustomBusinessMonthBegin.isAnchored + CustomBusinessMonthBegin.onOffset + +SemiMonthOffset +~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthOffset + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthOffset.freqstr + SemiMonthOffset.kwds + SemiMonthOffset.name + SemiMonthOffset.nanos + SemiMonthOffset.normalize + SemiMonthOffset.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthOffset.apply + SemiMonthOffset.apply_index + SemiMonthOffset.copy + SemiMonthOffset.isAnchored + SemiMonthOffset.onOffset + +SemiMonthEnd +~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthEnd.freqstr + SemiMonthEnd.kwds + SemiMonthEnd.name + SemiMonthEnd.nanos + SemiMonthEnd.normalize + SemiMonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthEnd.apply + SemiMonthEnd.apply_index + SemiMonthEnd.copy + SemiMonthEnd.isAnchored + SemiMonthEnd.onOffset + +SemiMonthBegin +~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthBegin.freqstr + SemiMonthBegin.kwds + SemiMonthBegin.name + SemiMonthBegin.nanos + SemiMonthBegin.normalize + SemiMonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + SemiMonthBegin.apply + SemiMonthBegin.apply_index + SemiMonthBegin.copy + SemiMonthBegin.isAnchored + SemiMonthBegin.onOffset + +Week +~~~~ +.. autosummary:: + :toctree: generated/ + + Week + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Week.freqstr + Week.kwds + Week.name + Week.nanos + Week.normalize + Week.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Week.apply + Week.apply_index + Week.copy + Week.isAnchored + Week.onOffset + +WeekOfMonth +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + WeekOfMonth + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + WeekOfMonth.freqstr + WeekOfMonth.kwds + WeekOfMonth.name + WeekOfMonth.nanos + WeekOfMonth.normalize + WeekOfMonth.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + WeekOfMonth.apply + WeekOfMonth.copy + WeekOfMonth.isAnchored + WeekOfMonth.onOffset + +LastWeekOfMonth +~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + LastWeekOfMonth + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + LastWeekOfMonth.freqstr + LastWeekOfMonth.kwds + LastWeekOfMonth.name + LastWeekOfMonth.nanos + LastWeekOfMonth.normalize + LastWeekOfMonth.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + LastWeekOfMonth.apply + LastWeekOfMonth.copy + LastWeekOfMonth.isAnchored + LastWeekOfMonth.onOffset + +QuarterOffset +~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterOffset + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterOffset.freqstr + QuarterOffset.kwds + QuarterOffset.name + QuarterOffset.nanos + QuarterOffset.normalize + QuarterOffset.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterOffset.apply + QuarterOffset.apply_index + QuarterOffset.copy + QuarterOffset.isAnchored + QuarterOffset.onOffset + +BQuarterEnd +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterEnd.freqstr + BQuarterEnd.kwds + BQuarterEnd.name + BQuarterEnd.nanos + BQuarterEnd.normalize + BQuarterEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterEnd.apply + BQuarterEnd.apply_index + BQuarterEnd.copy + BQuarterEnd.isAnchored + BQuarterEnd.onOffset + +BQuarterBegin +~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterBegin.freqstr + BQuarterBegin.kwds + BQuarterBegin.name + BQuarterBegin.nanos + BQuarterBegin.normalize + BQuarterBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BQuarterBegin.apply + BQuarterBegin.apply_index + BQuarterBegin.copy + BQuarterBegin.isAnchored + BQuarterBegin.onOffset + +QuarterEnd +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterEnd.freqstr + QuarterEnd.kwds + QuarterEnd.name + QuarterEnd.nanos + QuarterEnd.normalize + QuarterEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterEnd.apply + QuarterEnd.apply_index + QuarterEnd.copy + QuarterEnd.isAnchored + QuarterEnd.onOffset + +QuarterBegin +~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterBegin.freqstr + QuarterBegin.kwds + QuarterBegin.name + QuarterBegin.nanos + QuarterBegin.normalize + QuarterBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + QuarterBegin.apply + QuarterBegin.apply_index + QuarterBegin.copy + QuarterBegin.isAnchored + QuarterBegin.onOffset + +YearOffset +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearOffset + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearOffset.freqstr + YearOffset.kwds + YearOffset.name + YearOffset.nanos + YearOffset.normalize + YearOffset.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearOffset.apply + YearOffset.apply_index + YearOffset.copy + YearOffset.isAnchored + YearOffset.onOffset + +BYearEnd +~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearEnd.freqstr + BYearEnd.kwds + BYearEnd.name + BYearEnd.nanos + BYearEnd.normalize + BYearEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearEnd.apply + BYearEnd.apply_index + BYearEnd.copy + BYearEnd.isAnchored + BYearEnd.onOffset + +BYearBegin +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearBegin.freqstr + BYearBegin.kwds + BYearBegin.name + BYearBegin.nanos + BYearBegin.normalize + BYearBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BYearBegin.apply + BYearBegin.apply_index + BYearBegin.copy + BYearBegin.isAnchored + BYearBegin.onOffset + +YearEnd +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearEnd.freqstr + YearEnd.kwds + YearEnd.name + YearEnd.nanos + YearEnd.normalize + YearEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearEnd.apply + YearEnd.apply_index + YearEnd.copy + YearEnd.isAnchored + YearEnd.onOffset + +YearBegin +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearBegin.freqstr + YearBegin.kwds + YearBegin.name + YearBegin.nanos + YearBegin.normalize + YearBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + YearBegin.apply + YearBegin.apply_index + YearBegin.copy + YearBegin.isAnchored + YearBegin.onOffset + +FY5253 +~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253 + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253.freqstr + FY5253.kwds + FY5253.name + FY5253.nanos + FY5253.normalize + FY5253.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253.apply + FY5253.copy + FY5253.get_rule_code_suffix + FY5253.get_year_end + FY5253.isAnchored + FY5253.onOffset + +FY5253Quarter +~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253Quarter + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253Quarter.freqstr + FY5253Quarter.kwds + FY5253Quarter.name + FY5253Quarter.nanos + FY5253Quarter.normalize + FY5253Quarter.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + FY5253Quarter.apply + FY5253Quarter.copy + FY5253Quarter.get_weeks + FY5253Quarter.isAnchored + FY5253Quarter.onOffset + FY5253Quarter.year_has_extra_week + +Easter +~~~~~~ +.. autosummary:: + :toctree: generated/ + + Easter + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Easter.freqstr + Easter.kwds + Easter.name + Easter.nanos + Easter.normalize + Easter.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Easter.apply + Easter.copy + Easter.isAnchored + Easter.onOffset + +Tick +~~~~ +.. autosummary:: + :toctree: generated/ + + Tick + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Tick.delta + Tick.freqstr + Tick.kwds + Tick.name + Tick.nanos + Tick.normalize + Tick.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Tick.copy + Tick.isAnchored + Tick.onOffset + +Day +~~~ +.. autosummary:: + :toctree: generated/ + + Day + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Day.delta + Day.freqstr + Day.kwds + Day.name + Day.nanos + Day.normalize + Day.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Day.copy + Day.isAnchored + Day.onOffset + +Hour +~~~~ +.. autosummary:: + :toctree: generated/ + + Hour + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Hour.delta + Hour.freqstr + Hour.kwds + Hour.name + Hour.nanos + Hour.normalize + Hour.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Hour.copy + Hour.isAnchored + Hour.onOffset + +Minute +~~~~~~ +.. autosummary:: + :toctree: generated/ + + Minute + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Minute.delta + Minute.freqstr + Minute.kwds + Minute.name + Minute.nanos + Minute.normalize + Minute.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Minute.copy + Minute.isAnchored + Minute.onOffset + +Second +~~~~~~ +.. autosummary:: + :toctree: generated/ + + Second + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Second.delta + Second.freqstr + Second.kwds + Second.name + Second.nanos + Second.normalize + Second.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Second.copy + Second.isAnchored + Second.onOffset + +Milli +~~~~~ +.. autosummary:: + :toctree: generated/ + + Milli + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Milli.delta + Milli.freqstr + Milli.kwds + Milli.name + Milli.nanos + Milli.normalize + Milli.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Milli.copy + Milli.isAnchored + Milli.onOffset + +Micro +~~~~~ +.. autosummary:: + :toctree: generated/ + + Micro + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Micro.delta + Micro.freqstr + Micro.kwds + Micro.name + Micro.nanos + Micro.normalize + Micro.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Micro.copy + Micro.isAnchored + Micro.onOffset + +Nano +~~~~ +.. autosummary:: + :toctree: generated/ + + Nano + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Nano.delta + Nano.freqstr + Nano.kwds + Nano.name + Nano.nanos + Nano.normalize + Nano.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Nano.copy + Nano.isAnchored + Nano.onOffset + +BDay +~~~~ +.. autosummary:: + :toctree: generated/ + + BDay + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BDay.base + BDay.freqstr + BDay.kwds + BDay.name + BDay.nanos + BDay.normalize + BDay.offset + BDay.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BDay.apply + BDay.apply_index + BDay.copy + BDay.isAnchored + BDay.onOffset + BDay.rollback + BDay.rollforward + +BMonthEnd +~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthEnd.base + BMonthEnd.freqstr + BMonthEnd.kwds + BMonthEnd.name + BMonthEnd.nanos + BMonthEnd.normalize + BMonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthEnd.apply + BMonthEnd.apply_index + BMonthEnd.copy + BMonthEnd.isAnchored + BMonthEnd.onOffset + BMonthEnd.rollback + BMonthEnd.rollforward + +BMonthBegin +~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthBegin.base + BMonthBegin.freqstr + BMonthBegin.kwds + BMonthBegin.name + BMonthBegin.nanos + BMonthBegin.normalize + BMonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + BMonthBegin.apply + BMonthBegin.apply_index + BMonthBegin.copy + BMonthBegin.isAnchored + BMonthBegin.onOffset + BMonthBegin.rollback + BMonthBegin.rollforward + +CBMonthEnd +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthEnd + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthEnd.base + CBMonthEnd.cbday_roll + CBMonthEnd.freqstr + CBMonthEnd.kwds + CBMonthEnd.m_offset + CBMonthEnd.month_roll + CBMonthEnd.name + CBMonthEnd.nanos + CBMonthEnd.normalize + CBMonthEnd.offset + CBMonthEnd.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthEnd.apply + CBMonthEnd.apply_index + CBMonthEnd.copy + CBMonthEnd.isAnchored + CBMonthEnd.onOffset + CBMonthEnd.rollback + CBMonthEnd.rollforward + +CBMonthBegin +~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthBegin + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthBegin.base + CBMonthBegin.cbday_roll + CBMonthBegin.freqstr + CBMonthBegin.kwds + CBMonthBegin.m_offset + CBMonthBegin.month_roll + CBMonthBegin.name + CBMonthBegin.nanos + CBMonthBegin.normalize + CBMonthBegin.offset + CBMonthBegin.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CBMonthBegin.apply + CBMonthBegin.apply_index + CBMonthBegin.copy + CBMonthBegin.isAnchored + CBMonthBegin.onOffset + CBMonthBegin.rollback + CBMonthBegin.rollforward + +CDay +~~~~ +.. autosummary:: + :toctree: generated/ + + CDay + +Properties +~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CDay.base + CDay.freqstr + CDay.kwds + CDay.name + CDay.nanos + CDay.normalize + CDay.offset + CDay.rule_code + +Methods +~~~~~~~ +.. autosummary:: + :toctree: generated/ + + CDay.apply + CDay.apply_index + CDay.copy + CDay.isAnchored + CDay.onOffset + CDay.rollback + CDay.rollforward + +.. _api.frequencies: + +Frequencies +----------- + +.. currentmodule:: pandas.tseries.frequencies + +.. _api.offsets: + +.. autosummary:: + :toctree: generated/ + + to_offset + + +Window +------ + +.. currentmodule:: pandas.core.window + +Rolling objects are returned by ``.rolling`` calls: :func:`pandas.DataFrame.rolling`, :func:`pandas.Series.rolling`, etc. +Expanding objects are returned by ``.expanding`` calls: :func:`pandas.DataFrame.expanding`, :func:`pandas.Series.expanding`, etc. +EWM objects are returned by ``.ewm`` calls: :func:`pandas.DataFrame.ewm`, :func:`pandas.Series.ewm`, etc. + +Standard moving window functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. currentmodule:: pandas.core.window + +.. autosummary:: + :toctree: generated/ + + Rolling.count + Rolling.sum + Rolling.mean + Rolling.median + Rolling.var + Rolling.std + Rolling.min + Rolling.max + Rolling.corr + Rolling.cov + Rolling.skew + Rolling.kurt + Rolling.apply + Rolling.aggregate + Rolling.quantile + Window.mean + Window.sum + +.. _api.functions_expanding: + +Standard expanding window functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. currentmodule:: pandas.core.window + +.. autosummary:: + :toctree: generated/ + + Expanding.count + Expanding.sum + Expanding.mean + Expanding.median + Expanding.var + Expanding.std + Expanding.min + Expanding.max + Expanding.corr + Expanding.cov + Expanding.skew + Expanding.kurt + Expanding.apply + Expanding.aggregate + Expanding.quantile + +Exponentially-weighted moving window functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. currentmodule:: pandas.core.window + +.. autosummary:: + :toctree: generated/ + + EWM.mean + EWM.std + EWM.var + EWM.corr + EWM.cov + +GroupBy +------- +.. currentmodule:: pandas.core.groupby + +GroupBy objects are returned by groupby calls: :func:`pandas.DataFrame.groupby`, :func:`pandas.Series.groupby`, etc. + +Indexing, iteration +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + GroupBy.__iter__ + GroupBy.groups + GroupBy.indices + GroupBy.get_group + +.. currentmodule:: pandas + +.. autosummary:: + :toctree: generated/ + :template: autosummary/class_without_autosummary.rst + + Grouper + +.. currentmodule:: pandas.core.groupby + +Function application +~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + GroupBy.apply + GroupBy.agg + GroupBy.aggregate + GroupBy.transform + GroupBy.pipe + +Computations / Descriptive Stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + GroupBy.all + GroupBy.any + GroupBy.bfill + GroupBy.count + GroupBy.cumcount + GroupBy.ffill + GroupBy.first + GroupBy.head + GroupBy.last + GroupBy.max + GroupBy.mean + GroupBy.median + GroupBy.min + GroupBy.ngroup + GroupBy.nth + GroupBy.ohlc + GroupBy.prod + GroupBy.rank + GroupBy.pct_change + GroupBy.size + GroupBy.sem + GroupBy.std + GroupBy.sum + GroupBy.var + GroupBy.tail + +The following methods are available in both ``SeriesGroupBy`` and +``DataFrameGroupBy`` objects, but may differ slightly, usually in that +the ``DataFrameGroupBy`` version usually permits the specification of an +axis argument, and often an argument indicating whether to restrict +application to columns of a specific data type. + +.. autosummary:: + :toctree: generated/ + + DataFrameGroupBy.all + DataFrameGroupBy.any + DataFrameGroupBy.bfill + DataFrameGroupBy.corr + DataFrameGroupBy.count + DataFrameGroupBy.cov + DataFrameGroupBy.cummax + DataFrameGroupBy.cummin + DataFrameGroupBy.cumprod + DataFrameGroupBy.cumsum + DataFrameGroupBy.describe + DataFrameGroupBy.diff + DataFrameGroupBy.ffill + DataFrameGroupBy.fillna + DataFrameGroupBy.filter + DataFrameGroupBy.hist + DataFrameGroupBy.idxmax + DataFrameGroupBy.idxmin + DataFrameGroupBy.mad + DataFrameGroupBy.pct_change + DataFrameGroupBy.plot + DataFrameGroupBy.quantile + DataFrameGroupBy.rank + DataFrameGroupBy.resample + DataFrameGroupBy.shift + DataFrameGroupBy.size + DataFrameGroupBy.skew + DataFrameGroupBy.take + DataFrameGroupBy.tshift + +The following methods are available only for ``SeriesGroupBy`` objects. + +.. autosummary:: + :toctree: generated/ + + SeriesGroupBy.nlargest + SeriesGroupBy.nsmallest + SeriesGroupBy.nunique + SeriesGroupBy.unique + SeriesGroupBy.value_counts + SeriesGroupBy.is_monotonic_increasing + SeriesGroupBy.is_monotonic_decreasing + +The following methods are available only for ``DataFrameGroupBy`` objects. + +.. autosummary:: + :toctree: generated/ + + DataFrameGroupBy.corrwith + DataFrameGroupBy.boxplot + +Resampling +---------- +.. currentmodule:: pandas.core.resample + +Resampler objects are returned by resample calls: :func:`pandas.DataFrame.resample`, :func:`pandas.Series.resample`. + +Indexing, iteration +~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Resampler.__iter__ + Resampler.groups + Resampler.indices + Resampler.get_group + +Function application +~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Resampler.apply + Resampler.aggregate + Resampler.transform + Resampler.pipe + +Upsampling +~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + Resampler.ffill + Resampler.backfill + Resampler.bfill + Resampler.pad + Resampler.nearest + Resampler.fillna + Resampler.asfreq + Resampler.interpolate + +Computations / Descriptive Stats +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Resampler.count + Resampler.nunique + Resampler.first + Resampler.last + Resampler.max + Resampler.mean + Resampler.median + Resampler.min + Resampler.ohlc + Resampler.prod + Resampler.size + Resampler.sem + Resampler.std + Resampler.sum + Resampler.var + Resampler.quantile + +Style +----- +.. currentmodule:: pandas.io.formats.style + +``Styler`` objects are returned by :attr:`pandas.DataFrame.style`. + +Styler Constructor +~~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Styler + Styler.from_custom_template + + +Styler Attributes +~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Styler.env + Styler.template + Styler.loader + +Style Application +~~~~~~~~~~~~~~~~~ +.. autosummary:: + :toctree: generated/ + + Styler.apply + Styler.applymap + Styler.where + Styler.format + Styler.set_precision + Styler.set_table_styles + Styler.set_table_attributes + Styler.set_caption + Styler.set_properties + Styler.set_uuid + Styler.clear + Styler.pipe + +Builtin Styles +~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + Styler.highlight_max + Styler.highlight_min + Styler.highlight_null + Styler.background_gradient + Styler.bar + +Style Export and Import +~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + Styler.render + Styler.export + Styler.use + Styler.to_excel + +Plotting +-------- + +.. currentmodule:: pandas.plotting + +The following functions are contained in the `pandas.plotting` module. + +.. autosummary:: + :toctree: generated/ + + andrews_curves + bootstrap_plot + deregister_matplotlib_converters + lag_plot + parallel_coordinates + radviz + register_matplotlib_converters + scatter_matrix + +.. currentmodule:: pandas + +General utility functions +------------------------- + +Working with options +~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + describe_option + reset_option + get_option + set_option + option_context + +Testing functions +~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + testing.assert_frame_equal + testing.assert_series_equal + testing.assert_index_equal + + +Exceptions and warnings +~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + errors.DtypeWarning + errors.EmptyDataError + errors.OutOfBoundsDatetime + errors.ParserError + errors.ParserWarning + errors.PerformanceWarning + errors.UnsortedIndexError + errors.UnsupportedFunctionCall + + +Data types related functionality +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. autosummary:: + :toctree: generated/ + + api.types.union_categoricals + api.types.infer_dtype + api.types.pandas_dtype + +Dtype introspection + +.. autosummary:: + :toctree: generated/ + + api.types.is_bool_dtype + api.types.is_categorical_dtype + api.types.is_complex_dtype + api.types.is_datetime64_any_dtype + api.types.is_datetime64_dtype + api.types.is_datetime64_ns_dtype + api.types.is_datetime64tz_dtype + api.types.is_extension_type + api.types.is_float_dtype + api.types.is_int64_dtype + api.types.is_integer_dtype + api.types.is_interval_dtype + api.types.is_numeric_dtype + api.types.is_object_dtype + api.types.is_period_dtype + api.types.is_signed_integer_dtype + api.types.is_string_dtype + api.types.is_timedelta64_dtype + api.types.is_timedelta64_ns_dtype + api.types.is_unsigned_integer_dtype + api.types.is_sparse + +Iterable introspection + +.. autosummary:: + :toctree: generated/ + + api.types.is_dict_like + api.types.is_file_like + api.types.is_list_like + api.types.is_named_tuple + api.types.is_iterator + +Scalar introspection + +.. autosummary:: + :toctree: generated/ + + api.types.is_bool + api.types.is_categorical + api.types.is_complex + api.types.is_datetimetz + api.types.is_float + api.types.is_hashable + api.types.is_integer + api.types.is_interval + api.types.is_number + api.types.is_period + api.types.is_re + api.types.is_re_compilable + api.types.is_scalar + +Extensions +---------- + +These are primarily intended for library authors looking to extend pandas +objects. + +.. currentmodule:: pandas + +.. autosummary:: + :toctree: generated/ + + api.extensions.register_extension_dtype + api.extensions.register_dataframe_accessor + api.extensions.register_series_accessor + api.extensions.register_index_accessor + api.extensions.ExtensionDtype + api.extensions.ExtensionArray + arrays.PandasArray + +.. This is to prevent warnings in the doc build. We don't want to encourage +.. these methods. + +.. toctree:: + :hidden: + + generated/pandas.DataFrame.blocks + generated/pandas.DataFrame.as_matrix + generated/pandas.DataFrame.ix + generated/pandas.Index.asi8 + generated/pandas.Index.data + generated/pandas.Index.flags + generated/pandas.Index.holds_integer + generated/pandas.Index.is_type_compatible + generated/pandas.Index.nlevels + generated/pandas.Index.sort + generated/pandas.Panel.agg + generated/pandas.Panel.aggregate + generated/pandas.Panel.blocks + generated/pandas.Panel.empty + generated/pandas.Panel.is_copy + generated/pandas.Panel.items + generated/pandas.Panel.ix + generated/pandas.Panel.major_axis + generated/pandas.Panel.minor_axis + generated/pandas.Series.asobject + generated/pandas.Series.blocks + generated/pandas.Series.from_array + generated/pandas.Series.ix + generated/pandas.Series.imag + generated/pandas.Series.real + + +.. Can't convince sphinx to generate toctree for this class attribute. +.. So we do it manually to avoid a warning + +.. toctree:: + :hidden: + + generated/pandas.api.extensions.ExtensionDtype.na_value From 7ee2984f913484a016de27bf3cb6059180a08699 Mon Sep 17 00:00:00 2001 From: makbigc Date: Tue, 1 Jan 2019 15:20:28 +0800 Subject: [PATCH 09/19] Update _do_convert_missing and dropna in frame.py --- pandas/core/frame.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 8aa27ceb6e8b6..bc8b92de7bed8 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4589,10 +4589,7 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None, else: raise TypeError('must specify how or thresh') - if axis == 0: - result = self.loc[mask] - else: - result = self.loc[:, mask] + result = self.loc(axis=axis)[mask] if inplace: self._update_inplace(result) @@ -4627,7 +4624,7 @@ def drop_duplicates(self, subset=None, keep='first', inplace=False): duplicated = self.duplicated(subset, keep=keep) if inplace: - inds, = (-duplicated).values.nonzero() + inds, = (-duplicated)._values.nonzero() new_data = self._data.take(inds) self._update_inplace(new_data) else: From 09823e08cb45336e1c9d95374db812d0a308e151 Mon Sep 17 00:00:00 2001 From: makbigc Date: Tue, 1 Jan 2019 17:39:00 +0800 Subject: [PATCH 10/19] Get rid of series.nonzero in test_reindex_level --- pandas/tests/frame/test_indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/frame/test_indexing.py b/pandas/tests/frame/test_indexing.py index b877ed93f07a2..441a885a64fcf 100644 --- a/pandas/tests/frame/test_indexing.py +++ b/pandas/tests/frame/test_indexing.py @@ -2168,7 +2168,7 @@ def test_reindex_level(self): def verify_first_level(df, level, idx, check_index_type=True): def f(val): - return np.nonzero(df[level] == val)[0] + return np.nonzero((df[level] == val).values)[0] i = np.concatenate(list(map(f, idx))) left = df.set_index(icol).reindex(idx, level=level) right = df.iloc[i].set_index(icol) From cad047310407e1c9395a4f0afbd6948241b3d552 Mon Sep 17 00:00:00 2001 From: makbigc Date: Tue, 1 Jan 2019 18:03:23 +0800 Subject: [PATCH 11/19] Change pytest.warns to tm.assert_produces_warning --- pandas/tests/series/test_missing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/series/test_missing.py b/pandas/tests/series/test_missing.py index 57232aa0e04cb..90ef465c5f239 100644 --- a/pandas/tests/series/test_missing.py +++ b/pandas/tests/series/test_missing.py @@ -1328,5 +1328,5 @@ def test_series_interpolate_intraday(self): def test_nonzero_warning(self): # GH 24048 ser = pd.Series([1, 0, 3, 4]) - with pytest.warns(FutureWarning, match="Series.nonzero()"): + with tm.assert_produces_warning(FutureWarning): ser.nonzero() From 850de6dcec1286293dc1fff5d713b3da7937eb0a Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 14:31:28 +0800 Subject: [PATCH 12/19] Change _values to _ndarray_values in drop_duplicates --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index bc8b92de7bed8..3ec83e2daacb9 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4624,7 +4624,7 @@ def drop_duplicates(self, subset=None, keep='first', inplace=False): duplicated = self.duplicated(subset, keep=keep) if inplace: - inds, = (-duplicated)._values.nonzero() + inds, = (-duplicated)._ndarray_values.nonzero() new_data = self._data.take(inds) self._update_inplace(new_data) else: From 8278828e75310e4bd513b7682bc4b7a0c8a94775 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 14:34:59 +0800 Subject: [PATCH 13/19] Change values to to_numpy() in test_verify_first_level --- pandas/tests/frame/test_indexing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/frame/test_indexing.py b/pandas/tests/frame/test_indexing.py index 441a885a64fcf..f113140261aea 100644 --- a/pandas/tests/frame/test_indexing.py +++ b/pandas/tests/frame/test_indexing.py @@ -2168,7 +2168,7 @@ def test_reindex_level(self): def verify_first_level(df, level, idx, check_index_type=True): def f(val): - return np.nonzero((df[level] == val).values)[0] + return np.nonzero((df[level] == val).to_numpy())[0] i = np.concatenate(list(map(f, idx))) left = df.set_index(icol).reindex(idx, level=level) right = df.iloc[i].set_index(icol) From eacead8d43fc06c5d9e6c63383351f5c3ca757a4 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 15:08:06 +0800 Subject: [PATCH 14/19] Update deprecation warning in nonzero --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index dce03a8368455..ac2fb50eda10e 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -575,7 +575,7 @@ def nonzero(self): """ msg = ("Series.nonzero() is deprecated " "and will be removed in a future version." - "Use np.nonzero(Series.values) instead") + "Use Series.to_numpy().non_zero() instead") warnings.warn(msg, FutureWarning, stacklevel=2) return self._values.nonzero() From 88c9e16da7d9a64220c551bf398bfbeb1452b669 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 15:39:03 +0800 Subject: [PATCH 15/19] Change values to _ndarray_values in _do_convert_missing --- pandas/io/stata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/io/stata.py b/pandas/io/stata.py index cc97ccf9780da..b5e7eb24465f5 100644 --- a/pandas/io/stata.py +++ b/pandas/io/stata.py @@ -1630,7 +1630,7 @@ def _do_convert_missing(self, data, convert_missing): if convert_missing: # Replacement follows Stata notation - missing_loc = np.argwhere(missing.values) + missing_loc = np.argwhere(missing._ndarray_values) umissing, umissing_loc = np.unique(series[missing], return_inverse=True) replacement = Series(series, dtype=np.object) From 4674696c8d748b7c3a85bd5ce58457e3066d2be3 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 17:47:38 +0800 Subject: [PATCH 16/19] Remove nonzero method from api/series.rst --- doc/source/api/series.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/source/api/series.rst b/doc/source/api/series.rst index 7d5e6037b012a..83d5a9126dd02 100644 --- a/doc/source/api/series.rst +++ b/doc/source/api/series.rst @@ -185,7 +185,6 @@ Computations / Descriptive Stats Series.is_monotonic_decreasing Series.value_counts Series.compound - Series.nonzero Reindexing / Selection / Label manipulation ------------------------------------------- From 959f0e2a1f81eb621f7b5b77729c0c6d8ab31114 Mon Sep 17 00:00:00 2001 From: makbigc Date: Sat, 5 Jan 2019 17:52:04 +0800 Subject: [PATCH 17/19] Update deprecation msg in nonzero --- pandas/core/series.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/series.py b/pandas/core/series.py index ac2fb50eda10e..720fbb56c9b5b 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -575,7 +575,7 @@ def nonzero(self): """ msg = ("Series.nonzero() is deprecated " "and will be removed in a future version." - "Use Series.to_numpy().non_zero() instead") + "Use Series.to_numpy().nonzero() instead") warnings.warn(msg, FutureWarning, stacklevel=2) return self._values.nonzero() From e3b6b1bc87f976707e3179cdaf8a09351b6d5d64 Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 5 Jan 2019 16:22:05 -0500 Subject: [PATCH 18/19] rm api.rst --- doc/source/api.rst | 4115 -------------------------------------------- 1 file changed, 4115 deletions(-) delete mode 100644 doc/source/api.rst diff --git a/doc/source/api.rst b/doc/source/api.rst deleted file mode 100644 index 6aad64ff48b50..0000000000000 --- a/doc/source/api.rst +++ /dev/null @@ -1,4115 +0,0 @@ -.. The currentmodule is needed here because the autosummary generation of files -.. happens before reading the files / substituting the header. -.. See https://github.com/pandas-dev/pandas/pull/24232 - -.. currentmodule:: pandas - -.. _api: - -{{ header }} - -************* -API Reference -************* - -This page gives an overview of all public pandas objects, functions and -methods. All classes and functions exposed in ``pandas.*`` namespace are public. - -Some subpackages are public which include ``pandas.errors``, -``pandas.plotting``, and ``pandas.testing``. Public functions in -``pandas.io`` and ``pandas.tseries`` submodules are mentioned in -the documentation. ``pandas.api.types`` subpackage holds some -public functions related to data types in pandas. - - -.. warning:: - - The ``pandas.core``, ``pandas.compat``, and ``pandas.util`` top-level modules are PRIVATE. Stable functionality in such modules is not guaranteed. - - -.. _api.functions: - -Input/Output ------------- - -Pickling -~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_pickle - -Flat File -~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_table - read_csv - read_fwf - read_msgpack - -Clipboard -~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_clipboard - -Excel -~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_excel - ExcelFile.parse - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - ExcelWriter - -JSON -~~~~ - -.. autosummary:: - :toctree: generated/ - - read_json - -.. currentmodule:: pandas.io.json - -.. autosummary:: - :toctree: generated/ - - json_normalize - build_table_schema - -.. currentmodule:: pandas - -HTML -~~~~ - -.. autosummary:: - :toctree: generated/ - - read_html - -HDFStore: PyTables (HDF5) -~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_hdf - HDFStore.put - HDFStore.append - HDFStore.get - HDFStore.select - HDFStore.info - HDFStore.keys - HDFStore.groups - HDFStore.walk - -Feather -~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_feather - -Parquet -~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_parquet - -SAS -~~~ - -.. autosummary:: - :toctree: generated/ - - read_sas - -SQL -~~~ - -.. autosummary:: - :toctree: generated/ - - read_sql_table - read_sql_query - read_sql - -Google BigQuery -~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_gbq - - -STATA -~~~~~ - -.. autosummary:: - :toctree: generated/ - - read_stata - -.. currentmodule:: pandas.io.stata - -.. autosummary:: - :toctree: generated/ - - StataReader.data - StataReader.data_label - StataReader.value_labels - StataReader.variable_labels - StataWriter.write_file - -.. currentmodule:: pandas - -General functions ------------------ - -Data manipulations -~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - melt - pivot - pivot_table - crosstab - cut - qcut - merge - merge_ordered - merge_asof - concat - get_dummies - factorize - unique - wide_to_long - -Top-level missing data -~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - isna - isnull - notna - notnull - -Top-level conversions -~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - to_numeric - -Top-level dealing with datetimelike -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - to_datetime - to_timedelta - date_range - bdate_range - period_range - timedelta_range - infer_freq - -Top-level dealing with intervals -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - interval_range - -Top-level evaluation -~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - eval - -Hashing -~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - util.hash_array - util.hash_pandas_object - -Testing -~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - test - -.. _api.series: - -Series ------- - -Constructor -~~~~~~~~~~~ - -.. currentmodule:: pandas - -.. autosummary:: - :toctree: generated/ - - Series - -Attributes -~~~~~~~~~~ -**Axes** - -.. autosummary:: - :toctree: generated/ - - Series.index - -.. autosummary:: - :toctree: generated/ - - Series.values - Series.dtype - Series.ftype - Series.shape - Series.nbytes - Series.ndim - Series.size - Series.strides - Series.itemsize - Series.base - Series.T - Series.memory_usage - Series.hasnans - Series.flags - Series.empty - Series.dtypes - Series.ftypes - Series.data - Series.is_copy - Series.name - Series.put - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.astype - Series.infer_objects - Series.convert_objects - Series.copy - Series.bool - Series.to_period - Series.to_timestamp - Series.to_list - Series.get_values - - -Indexing, iteration -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.get - Series.at - Series.iat - Series.loc - Series.iloc - Series.__iter__ - Series.iteritems - Series.items - Series.keys - Series.pop - Series.item - Series.xs - -For more information on ``.at``, ``.iat``, ``.loc``, and -``.iloc``, see the :ref:`indexing documentation `. - -Binary operator functions -~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.add - Series.sub - Series.mul - Series.div - Series.truediv - Series.floordiv - Series.mod - Series.pow - Series.radd - Series.rsub - Series.rmul - Series.rdiv - Series.rtruediv - Series.rfloordiv - Series.rmod - Series.rpow - Series.combine - Series.combine_first - Series.round - Series.lt - Series.gt - Series.le - Series.ge - Series.ne - Series.eq - Series.product - Series.dot - -Function application, GroupBy & Window -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.apply - Series.agg - Series.aggregate - Series.transform - Series.map - Series.groupby - Series.rolling - Series.expanding - Series.ewm - Series.pipe - -.. _api.series.stats: - -Computations / Descriptive Stats -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.abs - Series.all - Series.any - Series.autocorr - Series.between - Series.clip - Series.clip_lower - Series.clip_upper - Series.corr - Series.count - Series.cov - Series.cummax - Series.cummin - Series.cumprod - Series.cumsum - Series.describe - Series.diff - Series.factorize - Series.kurt - Series.mad - Series.max - Series.mean - Series.median - Series.min - Series.mode - Series.nlargest - Series.nsmallest - Series.pct_change - Series.prod - Series.quantile - Series.rank - Series.sem - Series.skew - Series.std - Series.sum - Series.var - Series.kurtosis - Series.unique - Series.nunique - Series.is_unique - Series.is_monotonic - Series.is_monotonic_increasing - Series.is_monotonic_decreasing - Series.value_counts - Series.compound - - -Reindexing / Selection / Label manipulation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.align - Series.drop - Series.droplevel - Series.drop_duplicates - Series.duplicated - Series.equals - Series.first - Series.head - Series.idxmax - Series.idxmin - Series.isin - Series.last - Series.reindex - Series.reindex_like - Series.rename - Series.rename_axis - Series.reset_index - Series.sample - Series.select - Series.set_axis - Series.take - Series.tail - Series.truncate - Series.where - Series.mask - Series.add_prefix - Series.add_suffix - Series.filter - -Missing data handling -~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.isna - Series.notna - Series.dropna - Series.fillna - Series.interpolate - -Reshaping, sorting -~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.argsort - Series.argmin - Series.argmax - Series.reorder_levels - Series.sort_values - Series.sort_index - Series.swaplevel - Series.unstack - Series.searchsorted - Series.ravel - Series.repeat - Series.squeeze - Series.view - - -Combining / joining / merging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.append - Series.replace - Series.update - -Time series-related -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.asfreq - Series.asof - Series.shift - Series.first_valid_index - Series.last_valid_index - Series.resample - Series.tz_convert - Series.tz_localize - Series.at_time - Series.between_time - Series.tshift - Series.slice_shift - -Datetimelike Properties -~~~~~~~~~~~~~~~~~~~~~~~ - -``Series.dt`` can be used to access the values of the series as -datetimelike and return several properties. -These can be accessed like ``Series.dt.``. - -**Datetime Properties** - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_attribute.rst - - Series.dt.date - Series.dt.time - Series.dt.timetz - Series.dt.year - Series.dt.month - Series.dt.day - Series.dt.hour - Series.dt.minute - Series.dt.second - Series.dt.microsecond - Series.dt.nanosecond - Series.dt.week - Series.dt.weekofyear - Series.dt.dayofweek - Series.dt.weekday - Series.dt.dayofyear - Series.dt.quarter - Series.dt.is_month_start - Series.dt.is_month_end - Series.dt.is_quarter_start - Series.dt.is_quarter_end - Series.dt.is_year_start - Series.dt.is_year_end - Series.dt.is_leap_year - Series.dt.daysinmonth - Series.dt.days_in_month - Series.dt.tz - Series.dt.freq - -**Datetime Methods** - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - Series.dt.to_period - Series.dt.to_pydatetime - Series.dt.tz_localize - Series.dt.tz_convert - Series.dt.normalize - Series.dt.strftime - Series.dt.round - Series.dt.floor - Series.dt.ceil - Series.dt.month_name - Series.dt.day_name - -**Period Properties** - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_attribute.rst - - Series.dt.qyear - Series.dt.start_time - Series.dt.end_time - -**Timedelta Properties** - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_attribute.rst - - Series.dt.days - Series.dt.seconds - Series.dt.microseconds - Series.dt.nanoseconds - Series.dt.components - -**Timedelta Methods** - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - Series.dt.to_pytimedelta - Series.dt.total_seconds - -String handling -~~~~~~~~~~~~~~~ -``Series.str`` can be used to access the values of the series as -strings and apply several methods to it. These can be accessed like -``Series.str.``. - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - Series.str.capitalize - Series.str.cat - Series.str.center - Series.str.contains - Series.str.count - Series.str.decode - Series.str.encode - Series.str.endswith - Series.str.extract - Series.str.extractall - Series.str.find - Series.str.findall - Series.str.get - Series.str.index - Series.str.join - Series.str.len - Series.str.ljust - Series.str.lower - Series.str.lstrip - Series.str.match - Series.str.normalize - Series.str.pad - Series.str.partition - Series.str.repeat - Series.str.replace - Series.str.rfind - Series.str.rindex - Series.str.rjust - Series.str.rpartition - Series.str.rstrip - Series.str.slice - Series.str.slice_replace - Series.str.split - Series.str.rsplit - Series.str.startswith - Series.str.strip - Series.str.swapcase - Series.str.title - Series.str.translate - Series.str.upper - Series.str.wrap - Series.str.zfill - Series.str.isalnum - Series.str.isalpha - Series.str.isdigit - Series.str.isspace - Series.str.islower - Series.str.isupper - Series.str.istitle - Series.str.isnumeric - Series.str.isdecimal - Series.str.get_dummies - -.. - The following is needed to ensure the generated pages are created with the - correct template (otherwise they would be created in the Series/Index class page) - -.. - .. autosummary:: - :toctree: generated/ - :template: autosummary/accessor.rst - - Series.str - Series.cat - Series.dt - Index.str - - -.. _api.arrays: - -Arrays ------- - -Pandas and third-party libraries can extend NumPy's type system (see :ref:`extending.extension-types`). - -.. autosummary:: - :toctree: generated/ - - array - -.. _api.categorical: - -Categorical -~~~~~~~~~~~ - -Pandas defines a custom data type for representing data that can take only a -limited, fixed set of values. The dtype of a ``Categorical`` can be described by -a :class:`pandas.api.types.CategoricalDtype`. - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - api.types.CategoricalDtype - -.. autosummary:: - :toctree: generated/ - - api.types.CategoricalDtype.categories - api.types.CategoricalDtype.ordered - -Categorical data can be stored in a :class:`pandas.Categorical` - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - Categorical - - -The alternative :meth:`Categorical.from_codes` constructor can be used when you -have the categories and integer codes already: - -.. autosummary:: - :toctree: generated/ - - Categorical.from_codes - -The dtype information is available on the ``Categorical`` - -.. autosummary:: - :toctree: generated/ - - Categorical.dtype - Categorical.categories - Categorical.ordered - Categorical.codes - -``np.asarray(categorical)`` works by implementing the array interface. Be aware, that this converts -the Categorical back to a NumPy array, so categories and order information is not preserved! - -.. autosummary:: - :toctree: generated/ - - Categorical.__array__ - -A ``Categorical`` can be stored in a ``Series`` or ``DataFrame``. -To create a Series of dtype ``category``, use ``cat = s.astype(dtype)`` or -``Series(..., dtype=dtype)`` where ``dtype`` is either - -* the string ``'category'`` -* an instance of :class:`~pandas.api.types.CategoricalDtype`. - -If the Series is of dtype ``CategoricalDtype``, ``Series.cat`` can be used to change the categorical -data. This accessor is similar to the ``Series.dt`` or ``Series.str`` and has the -following usable methods and properties: - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_attribute.rst - - Series.cat.categories - Series.cat.ordered - Series.cat.codes - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - Series.cat.rename_categories - Series.cat.reorder_categories - Series.cat.add_categories - Series.cat.remove_categories - Series.cat.remove_unused_categories - Series.cat.set_categories - Series.cat.as_ordered - Series.cat.as_unordered - -.. _api.arrays.integerna: - -Integer-NA -~~~~~~~~~~ - -:class:`arrays.IntegerArray` can hold integer data, potentially with missing -values. - -.. autosummary:: - :toctree: generated/ - - arrays.IntegerArray - -.. _api.arrays.interval: - -Interval -~~~~~~~~ - -:class:`IntervalArray` is an array for storing data representing intervals. -The scalar type is a :class:`Interval`. These may be stored in a :class:`Series` -or as a :class:`IntervalIndex`. :class:`IntervalArray` can be closed on the -``'left'``, ``'right'``, or ``'both'``, or ``'neither'`` sides. -See :ref:`indexing.intervallindex` for more. - -.. currentmodule:: pandas - -.. autosummary:: - :toctree: generated/ - - IntervalArray - -.. _api.arrays.period: - -Period -~~~~~~ - -Periods represent a span of time (e.g. the year 2000, or the hour from 11:00 to 12:00 -on January 1st, 2000). A collection of :class:`Period` objects with a common frequency -can be collected in a :class:`PeriodArray`. See :ref:`timeseries.periods` for more. - -.. autosummary:: - :toctree: generated/ - - arrays.PeriodArray - -Sparse -~~~~~~ - -Sparse data may be stored and operated on more efficiently when there is a single value -that's often repeated. :class:`SparseArray` is a container for this type of data. -See :ref:`sparse` for more. - -.. _api.arrays.sparse: - -.. autosummary:: - :toctree: generated/ - - SparseArray - -Plotting -~~~~~~~~ - -``Series.plot`` is both a callable method and a namespace attribute for -specific plotting methods of the form ``Series.plot.``. - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_callable.rst - - Series.plot - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - Series.plot.area - Series.plot.bar - Series.plot.barh - Series.plot.box - Series.plot.density - Series.plot.hist - Series.plot.kde - Series.plot.line - Series.plot.pie - -.. autosummary:: - :toctree: generated/ - - Series.hist - -Serialization / IO / Conversion -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Series.to_pickle - Series.to_csv - Series.to_dict - Series.to_excel - Series.to_frame - Series.to_xarray - Series.to_hdf - Series.to_sql - Series.to_msgpack - Series.to_json - Series.to_sparse - Series.to_dense - Series.to_string - Series.to_clipboard - Series.to_latex - -Sparse -~~~~~~ -.. autosummary:: - :toctree: generated/ - - SparseSeries.to_coo - SparseSeries.from_coo - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_attribute.rst - - Series.sparse.npoints - Series.sparse.density - Series.sparse.fill_value - Series.sparse.sp_values - - -.. autosummary:: - :toctree: generated/ - - Series.sparse.from_coo - Series.sparse.to_coo - -.. _api.dataframe: - -DataFrame ---------- - -Constructor -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame - -Attributes and underlying data -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Axes** - -.. autosummary:: - :toctree: generated/ - - DataFrame.index - DataFrame.columns - -.. autosummary:: - :toctree: generated/ - - DataFrame.dtypes - DataFrame.ftypes - DataFrame.get_dtype_counts - DataFrame.get_ftype_counts - DataFrame.select_dtypes - DataFrame.values - DataFrame.get_values - DataFrame.axes - DataFrame.ndim - DataFrame.size - DataFrame.shape - DataFrame.memory_usage - DataFrame.empty - DataFrame.is_copy - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.astype - DataFrame.convert_objects - DataFrame.infer_objects - DataFrame.copy - DataFrame.isna - DataFrame.notna - DataFrame.bool - -Indexing, iteration -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.head - DataFrame.at - DataFrame.iat - DataFrame.loc - DataFrame.iloc - DataFrame.insert - DataFrame.__iter__ - DataFrame.items - DataFrame.keys - DataFrame.iteritems - DataFrame.iterrows - DataFrame.itertuples - DataFrame.lookup - DataFrame.pop - DataFrame.tail - DataFrame.xs - DataFrame.get - DataFrame.isin - DataFrame.where - DataFrame.mask - DataFrame.query - -For more information on ``.at``, ``.iat``, ``.loc``, and -``.iloc``, see the :ref:`indexing documentation `. - - -Binary operator functions -~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.add - DataFrame.sub - DataFrame.mul - DataFrame.div - DataFrame.truediv - DataFrame.floordiv - DataFrame.mod - DataFrame.pow - DataFrame.dot - DataFrame.radd - DataFrame.rsub - DataFrame.rmul - DataFrame.rdiv - DataFrame.rtruediv - DataFrame.rfloordiv - DataFrame.rmod - DataFrame.rpow - DataFrame.lt - DataFrame.gt - DataFrame.le - DataFrame.ge - DataFrame.ne - DataFrame.eq - DataFrame.combine - DataFrame.combine_first - -Function application, GroupBy & Window -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.apply - DataFrame.applymap - DataFrame.pipe - DataFrame.agg - DataFrame.aggregate - DataFrame.transform - DataFrame.groupby - DataFrame.rolling - DataFrame.expanding - DataFrame.ewm - -.. _api.dataframe.stats: - -Computations / Descriptive Stats -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.abs - DataFrame.all - DataFrame.any - DataFrame.clip - DataFrame.clip_lower - DataFrame.clip_upper - DataFrame.compound - DataFrame.corr - DataFrame.corrwith - DataFrame.count - DataFrame.cov - DataFrame.cummax - DataFrame.cummin - DataFrame.cumprod - DataFrame.cumsum - DataFrame.describe - DataFrame.diff - DataFrame.eval - DataFrame.kurt - DataFrame.kurtosis - DataFrame.mad - DataFrame.max - DataFrame.mean - DataFrame.median - DataFrame.min - DataFrame.mode - DataFrame.pct_change - DataFrame.prod - DataFrame.product - DataFrame.quantile - DataFrame.rank - DataFrame.round - DataFrame.sem - DataFrame.skew - DataFrame.sum - DataFrame.std - DataFrame.var - DataFrame.nunique - -Reindexing / Selection / Label manipulation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.add_prefix - DataFrame.add_suffix - DataFrame.align - DataFrame.at_time - DataFrame.between_time - DataFrame.drop - DataFrame.drop_duplicates - DataFrame.duplicated - DataFrame.equals - DataFrame.filter - DataFrame.first - DataFrame.head - DataFrame.idxmax - DataFrame.idxmin - DataFrame.last - DataFrame.reindex - DataFrame.reindex_axis - DataFrame.reindex_like - DataFrame.rename - DataFrame.rename_axis - DataFrame.reset_index - DataFrame.sample - DataFrame.select - DataFrame.set_axis - DataFrame.set_index - DataFrame.tail - DataFrame.take - DataFrame.truncate - -.. _api.dataframe.missing: - -Missing data handling -~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.dropna - DataFrame.fillna - DataFrame.replace - DataFrame.interpolate - -Reshaping, sorting, transposing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.droplevel - DataFrame.pivot - DataFrame.pivot_table - DataFrame.reorder_levels - DataFrame.sort_values - DataFrame.sort_index - DataFrame.nlargest - DataFrame.nsmallest - DataFrame.swaplevel - DataFrame.stack - DataFrame.unstack - DataFrame.swapaxes - DataFrame.melt - DataFrame.squeeze - DataFrame.to_panel - DataFrame.to_xarray - DataFrame.T - DataFrame.transpose - -Combining / joining / merging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.append - DataFrame.assign - DataFrame.join - DataFrame.merge - DataFrame.update - -Time series-related -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.asfreq - DataFrame.asof - DataFrame.shift - DataFrame.slice_shift - DataFrame.tshift - DataFrame.first_valid_index - DataFrame.last_valid_index - DataFrame.resample - DataFrame.to_period - DataFrame.to_timestamp - DataFrame.tz_convert - DataFrame.tz_localize - -.. _api.dataframe.plotting: - -Plotting -~~~~~~~~ - -``DataFrame.plot`` is both a callable method and a namespace attribute for -specific plotting methods of the form ``DataFrame.plot.``. - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_callable.rst - - DataFrame.plot - -.. autosummary:: - :toctree: generated/ - :template: autosummary/accessor_method.rst - - DataFrame.plot.area - DataFrame.plot.bar - DataFrame.plot.barh - DataFrame.plot.box - DataFrame.plot.density - DataFrame.plot.hexbin - DataFrame.plot.hist - DataFrame.plot.kde - DataFrame.plot.line - DataFrame.plot.pie - DataFrame.plot.scatter - -.. autosummary:: - :toctree: generated/ - - DataFrame.boxplot - DataFrame.hist - -Serialization / IO / Conversion -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DataFrame.from_csv - DataFrame.from_dict - DataFrame.from_items - DataFrame.from_records - DataFrame.info - DataFrame.to_parquet - DataFrame.to_pickle - DataFrame.to_csv - DataFrame.to_hdf - DataFrame.to_sql - DataFrame.to_dict - DataFrame.to_excel - DataFrame.to_json - DataFrame.to_html - DataFrame.to_feather - DataFrame.to_latex - DataFrame.to_stata - DataFrame.to_msgpack - DataFrame.to_gbq - DataFrame.to_records - DataFrame.to_sparse - DataFrame.to_dense - DataFrame.to_string - DataFrame.to_clipboard - DataFrame.style - -Sparse -~~~~~~ -.. autosummary:: - :toctree: generated/ - - SparseDataFrame.to_coo - -.. _api.panel: - -Panel ------- - -Constructor -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel - -Attributes and underlying data -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Axes** - -* **items**: axis 0; each item corresponds to a DataFrame contained inside -* **major_axis**: axis 1; the index (rows) of each of the DataFrames -* **minor_axis**: axis 2; the columns of each of the DataFrames - -.. autosummary:: - :toctree: generated/ - - Panel.values - Panel.axes - Panel.ndim - Panel.size - Panel.shape - Panel.dtypes - Panel.ftypes - Panel.get_dtype_counts - Panel.get_ftype_counts - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.astype - Panel.copy - Panel.isna - Panel.notna - -Getting and setting -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.get_value - Panel.set_value - -Indexing, iteration, slicing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.at - Panel.iat - Panel.loc - Panel.iloc - Panel.__iter__ - Panel.iteritems - Panel.pop - Panel.xs - Panel.major_xs - Panel.minor_xs - -For more information on ``.at``, ``.iat``, ``.loc``, and -``.iloc``, see the :ref:`indexing documentation `. - -Binary operator functions -~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.add - Panel.sub - Panel.mul - Panel.div - Panel.truediv - Panel.floordiv - Panel.mod - Panel.pow - Panel.radd - Panel.rsub - Panel.rmul - Panel.rdiv - Panel.rtruediv - Panel.rfloordiv - Panel.rmod - Panel.rpow - Panel.lt - Panel.gt - Panel.le - Panel.ge - Panel.ne - Panel.eq - -Function application, GroupBy -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.apply - Panel.groupby - -.. _api.panel.stats: - -Computations / Descriptive Stats -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.abs - Panel.clip - Panel.clip_lower - Panel.clip_upper - Panel.count - Panel.cummax - Panel.cummin - Panel.cumprod - Panel.cumsum - Panel.max - Panel.mean - Panel.median - Panel.min - Panel.pct_change - Panel.prod - Panel.sem - Panel.skew - Panel.sum - Panel.std - Panel.var - - -Reindexing / Selection / Label manipulation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.add_prefix - Panel.add_suffix - Panel.drop - Panel.equals - Panel.filter - Panel.first - Panel.last - Panel.reindex - Panel.reindex_axis - Panel.reindex_like - Panel.rename - Panel.sample - Panel.select - Panel.take - Panel.truncate - - -Missing data handling -~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.dropna - -Reshaping, sorting, transposing -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.sort_index - Panel.swaplevel - Panel.transpose - Panel.swapaxes - Panel.conform - -Combining / joining / merging -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.join - Panel.update - -Time series-related -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.asfreq - Panel.shift - Panel.resample - Panel.tz_convert - Panel.tz_localize - -Serialization / IO / Conversion -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Panel.from_dict - Panel.to_pickle - Panel.to_excel - Panel.to_hdf - Panel.to_sparse - Panel.to_frame - Panel.to_clipboard - -.. _api.index: - -Index ------ - -**Many of these methods or variants thereof are available on the objects -that contain an index (Series/DataFrame) and those should most likely be -used before calling these methods directly.** - -.. autosummary:: - :toctree: generated/ - - Index - -Attributes -~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - Index.values - Index.is_monotonic - Index.is_monotonic_increasing - Index.is_monotonic_decreasing - Index.is_unique - Index.has_duplicates - Index.hasnans - Index.dtype - Index.dtype_str - Index.inferred_type - Index.is_all_dates - Index.shape - Index.name - Index.names - Index.nbytes - Index.ndim - Index.size - Index.empty - Index.strides - Index.itemsize - Index.base - Index.T - Index.memory_usage - -Modifying and Computations -~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.all - Index.any - Index.argmin - Index.argmax - Index.copy - Index.delete - Index.drop - Index.drop_duplicates - Index.duplicated - Index.equals - Index.factorize - Index.identical - Index.insert - Index.is_ - Index.is_boolean - Index.is_categorical - Index.is_floating - Index.is_integer - Index.is_interval - Index.is_mixed - Index.is_numeric - Index.is_object - Index.min - Index.max - Index.reindex - Index.rename - Index.repeat - Index.where - Index.take - Index.putmask - Index.unique - Index.nunique - Index.value_counts - -Compatibility with MultiIndex -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.set_names - Index.is_lexsorted_for_tuple - Index.droplevel - -Missing Values -~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.fillna - Index.dropna - Index.isna - Index.notna - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.astype - Index.item - Index.map - Index.ravel - Index.to_list - Index.to_native_types - Index.to_series - Index.to_frame - Index.view - -Sorting -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.argsort - Index.searchsorted - Index.sort_values - -Time-specific operations -~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.shift - -Combining / joining / set operations -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.append - Index.join - Index.intersection - Index.union - Index.difference - Index.symmetric_difference - -Selecting -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Index.asof - Index.asof_locs - Index.contains - Index.get_duplicates - Index.get_indexer - Index.get_indexer_for - Index.get_indexer_non_unique - Index.get_level_values - Index.get_loc - Index.get_slice_bound - Index.get_value - Index.get_values - Index.set_value - Index.isin - Index.slice_indexer - Index.slice_locs - -.. _api.numericindex: - -Numeric Index -------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - RangeIndex - Int64Index - UInt64Index - Float64Index - -.. We need this autosummary so that the methods are generated. -.. Separate block, since they aren't classes. - -.. autosummary:: - :toctree: generated/ - - RangeIndex.from_range - - -.. _api.categoricalindex: - -CategoricalIndex ----------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - CategoricalIndex - -Categorical Components -~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - CategoricalIndex.codes - CategoricalIndex.categories - CategoricalIndex.ordered - CategoricalIndex.rename_categories - CategoricalIndex.reorder_categories - CategoricalIndex.add_categories - CategoricalIndex.remove_categories - CategoricalIndex.remove_unused_categories - CategoricalIndex.set_categories - CategoricalIndex.as_ordered - CategoricalIndex.as_unordered - -Modifying and Computations -~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CategoricalIndex.map - CategoricalIndex.equals - -.. _api.intervalindex: - -IntervalIndex -------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - IntervalIndex - -IntervalIndex Components -~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - IntervalIndex.from_arrays - IntervalIndex.from_tuples - IntervalIndex.from_breaks - IntervalIndex.contains - IntervalIndex.left - IntervalIndex.right - IntervalIndex.mid - IntervalIndex.closed - IntervalIndex.length - IntervalIndex.values - IntervalIndex.is_non_overlapping_monotonic - IntervalIndex.is_overlapping - IntervalIndex.get_loc - IntervalIndex.get_indexer - IntervalIndex.set_closed - IntervalIndex.overlaps - IntervalArray.to_tuples - - -.. _api.multiindex: - -MultiIndex ----------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - MultiIndex - -.. autosummary:: - :toctree: generated/ - - IndexSlice - -MultiIndex Constructors -~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - MultiIndex.from_arrays - MultiIndex.from_tuples - MultiIndex.from_product - MultiIndex.from_frame - -MultiIndex Attributes -~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - MultiIndex.names - MultiIndex.levels - MultiIndex.codes - MultiIndex.nlevels - MultiIndex.levshape - -MultiIndex Components -~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - MultiIndex.set_levels - MultiIndex.set_codes - MultiIndex.to_hierarchical - MultiIndex.to_flat_index - MultiIndex.to_frame - MultiIndex.is_lexsorted - MultiIndex.sortlevel - MultiIndex.droplevel - MultiIndex.swaplevel - MultiIndex.reorder_levels - MultiIndex.remove_unused_levels - -MultiIndex Selecting -~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - MultiIndex.get_loc - MultiIndex.get_loc_level - MultiIndex.get_indexer - MultiIndex.get_level_values - -.. _api.datetimeindex: - -DatetimeIndex -------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - DatetimeIndex - -Time/Date Components -~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - DatetimeIndex.year - DatetimeIndex.month - DatetimeIndex.day - DatetimeIndex.hour - DatetimeIndex.minute - DatetimeIndex.second - DatetimeIndex.microsecond - DatetimeIndex.nanosecond - DatetimeIndex.date - DatetimeIndex.time - DatetimeIndex.timetz - DatetimeIndex.dayofyear - DatetimeIndex.weekofyear - DatetimeIndex.week - DatetimeIndex.dayofweek - DatetimeIndex.weekday - DatetimeIndex.quarter - DatetimeIndex.tz - DatetimeIndex.freq - DatetimeIndex.freqstr - DatetimeIndex.is_month_start - DatetimeIndex.is_month_end - DatetimeIndex.is_quarter_start - DatetimeIndex.is_quarter_end - DatetimeIndex.is_year_start - DatetimeIndex.is_year_end - DatetimeIndex.is_leap_year - DatetimeIndex.inferred_freq - -Selecting -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DatetimeIndex.indexer_at_time - DatetimeIndex.indexer_between_time - - -Time-specific operations -~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DatetimeIndex.normalize - DatetimeIndex.strftime - DatetimeIndex.snap - DatetimeIndex.tz_convert - DatetimeIndex.tz_localize - DatetimeIndex.round - DatetimeIndex.floor - DatetimeIndex.ceil - DatetimeIndex.month_name - DatetimeIndex.day_name - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DatetimeIndex.to_period - DatetimeIndex.to_perioddelta - DatetimeIndex.to_pydatetime - DatetimeIndex.to_series - DatetimeIndex.to_frame - -TimedeltaIndex --------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - TimedeltaIndex - -Components -~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - TimedeltaIndex.days - TimedeltaIndex.seconds - TimedeltaIndex.microseconds - TimedeltaIndex.nanoseconds - TimedeltaIndex.components - TimedeltaIndex.inferred_freq - -Conversion -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - TimedeltaIndex.to_pytimedelta - TimedeltaIndex.to_series - TimedeltaIndex.round - TimedeltaIndex.floor - TimedeltaIndex.ceil - TimedeltaIndex.to_frame - -.. currentmodule:: pandas - -PeriodIndex --------------- - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - PeriodIndex - -Attributes -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - PeriodIndex.day - PeriodIndex.dayofweek - PeriodIndex.dayofyear - PeriodIndex.days_in_month - PeriodIndex.daysinmonth - PeriodIndex.end_time - PeriodIndex.freq - PeriodIndex.freqstr - PeriodIndex.hour - PeriodIndex.is_leap_year - PeriodIndex.minute - PeriodIndex.month - PeriodIndex.quarter - PeriodIndex.qyear - PeriodIndex.second - PeriodIndex.start_time - PeriodIndex.week - PeriodIndex.weekday - PeriodIndex.weekofyear - PeriodIndex.year - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - PeriodIndex.asfreq - PeriodIndex.strftime - PeriodIndex.to_timestamp - -.. api.scalars: - -Scalars -------- - -Period -~~~~~~ -.. autosummary:: - :toctree: generated/ - - Period - -Attributes -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Period.day - Period.dayofweek - Period.dayofyear - Period.days_in_month - Period.daysinmonth - Period.end_time - Period.freq - Period.freqstr - Period.hour - Period.is_leap_year - Period.minute - Period.month - Period.ordinal - Period.quarter - Period.qyear - Period.second - Period.start_time - Period.week - Period.weekday - Period.weekofyear - Period.year - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Period.asfreq - Period.now - Period.strftime - Period.to_timestamp - -Timestamp -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timestamp - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timestamp.asm8 - Timestamp.day - Timestamp.dayofweek - Timestamp.dayofyear - Timestamp.days_in_month - Timestamp.daysinmonth - Timestamp.fold - Timestamp.hour - Timestamp.is_leap_year - Timestamp.is_month_end - Timestamp.is_month_start - Timestamp.is_quarter_end - Timestamp.is_quarter_start - Timestamp.is_year_end - Timestamp.is_year_start - Timestamp.max - Timestamp.microsecond - Timestamp.min - Timestamp.minute - Timestamp.month - Timestamp.nanosecond - Timestamp.quarter - Timestamp.resolution - Timestamp.second - Timestamp.tz - Timestamp.tzinfo - Timestamp.value - Timestamp.week - Timestamp.weekofyear - Timestamp.year - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timestamp.astimezone - Timestamp.ceil - Timestamp.combine - Timestamp.ctime - Timestamp.date - Timestamp.day_name - Timestamp.dst - Timestamp.floor - Timestamp.freq - Timestamp.freqstr - Timestamp.fromordinal - Timestamp.fromtimestamp - Timestamp.isocalendar - Timestamp.isoformat - Timestamp.isoweekday - Timestamp.month_name - Timestamp.normalize - Timestamp.now - Timestamp.replace - Timestamp.round - Timestamp.strftime - Timestamp.strptime - Timestamp.time - Timestamp.timestamp - Timestamp.timetuple - Timestamp.timetz - Timestamp.to_datetime64 - Timestamp.to_julian_date - Timestamp.to_period - Timestamp.to_pydatetime - Timestamp.today - Timestamp.toordinal - Timestamp.tz_convert - Timestamp.tz_localize - Timestamp.tzname - Timestamp.utcfromtimestamp - Timestamp.utcnow - Timestamp.utcoffset - Timestamp.utctimetuple - Timestamp.weekday - -Interval -~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Interval - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Interval.closed - Interval.closed_left - Interval.closed_right - Interval.left - Interval.length - Interval.mid - Interval.open_left - Interval.open_right - Interval.overlaps - Interval.right - -Timedelta -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timedelta - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timedelta.asm8 - Timedelta.components - Timedelta.days - Timedelta.delta - Timedelta.freq - Timedelta.is_populated - Timedelta.max - Timedelta.microseconds - Timedelta.min - Timedelta.nanoseconds - Timedelta.resolution - Timedelta.seconds - Timedelta.value - Timedelta.view - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Timedelta.ceil - Timedelta.floor - Timedelta.isoformat - Timedelta.round - Timedelta.to_pytimedelta - Timedelta.to_timedelta64 - Timedelta.total_seconds - -.. _api.dateoffsets: - -Date Offsets ------------- - -.. currentmodule:: pandas.tseries.offsets - -DateOffset -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DateOffset - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DateOffset.freqstr - DateOffset.kwds - DateOffset.name - DateOffset.nanos - DateOffset.normalize - DateOffset.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - DateOffset.apply - DateOffset.copy - DateOffset.isAnchored - DateOffset.onOffset - -BusinessDay -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessDay - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessDay.freqstr - BusinessDay.kwds - BusinessDay.name - BusinessDay.nanos - BusinessDay.normalize - BusinessDay.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessDay.apply - BusinessDay.apply_index - BusinessDay.copy - BusinessDay.isAnchored - BusinessDay.onOffset - -BusinessHour -~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessHour - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessHour.freqstr - BusinessHour.kwds - BusinessHour.name - BusinessHour.nanos - BusinessHour.normalize - BusinessHour.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessHour.apply - BusinessHour.copy - BusinessHour.isAnchored - BusinessHour.onOffset - -CustomBusinessDay -~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessDay - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessDay.freqstr - CustomBusinessDay.kwds - CustomBusinessDay.name - CustomBusinessDay.nanos - CustomBusinessDay.normalize - CustomBusinessDay.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessDay.apply - CustomBusinessDay.copy - CustomBusinessDay.isAnchored - CustomBusinessDay.onOffset - -CustomBusinessHour -~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessHour - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessHour.freqstr - CustomBusinessHour.kwds - CustomBusinessHour.name - CustomBusinessHour.nanos - CustomBusinessHour.normalize - CustomBusinessHour.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessHour.apply - CustomBusinessHour.copy - CustomBusinessHour.isAnchored - CustomBusinessHour.onOffset - -MonthOffset -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthOffset - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthOffset.freqstr - MonthOffset.kwds - MonthOffset.name - MonthOffset.nanos - MonthOffset.normalize - MonthOffset.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthOffset.apply - MonthOffset.apply_index - MonthOffset.copy - MonthOffset.isAnchored - MonthOffset.onOffset - -MonthEnd -~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthEnd.freqstr - MonthEnd.kwds - MonthEnd.name - MonthEnd.nanos - MonthEnd.normalize - MonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthEnd.apply - MonthEnd.apply_index - MonthEnd.copy - MonthEnd.isAnchored - MonthEnd.onOffset - -MonthBegin -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthBegin.freqstr - MonthBegin.kwds - MonthBegin.name - MonthBegin.nanos - MonthBegin.normalize - MonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - MonthBegin.apply - MonthBegin.apply_index - MonthBegin.copy - MonthBegin.isAnchored - MonthBegin.onOffset - -BusinessMonthEnd -~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthEnd.freqstr - BusinessMonthEnd.kwds - BusinessMonthEnd.name - BusinessMonthEnd.nanos - BusinessMonthEnd.normalize - BusinessMonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthEnd.apply - BusinessMonthEnd.apply_index - BusinessMonthEnd.copy - BusinessMonthEnd.isAnchored - BusinessMonthEnd.onOffset - -BusinessMonthBegin -~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthBegin.freqstr - BusinessMonthBegin.kwds - BusinessMonthBegin.name - BusinessMonthBegin.nanos - BusinessMonthBegin.normalize - BusinessMonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BusinessMonthBegin.apply - BusinessMonthBegin.apply_index - BusinessMonthBegin.copy - BusinessMonthBegin.isAnchored - BusinessMonthBegin.onOffset - -CustomBusinessMonthEnd -~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthEnd.freqstr - CustomBusinessMonthEnd.kwds - CustomBusinessMonthEnd.m_offset - CustomBusinessMonthEnd.name - CustomBusinessMonthEnd.nanos - CustomBusinessMonthEnd.normalize - CustomBusinessMonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthEnd.apply - CustomBusinessMonthEnd.copy - CustomBusinessMonthEnd.isAnchored - CustomBusinessMonthEnd.onOffset - -CustomBusinessMonthBegin -~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthBegin.freqstr - CustomBusinessMonthBegin.kwds - CustomBusinessMonthBegin.m_offset - CustomBusinessMonthBegin.name - CustomBusinessMonthBegin.nanos - CustomBusinessMonthBegin.normalize - CustomBusinessMonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CustomBusinessMonthBegin.apply - CustomBusinessMonthBegin.copy - CustomBusinessMonthBegin.isAnchored - CustomBusinessMonthBegin.onOffset - -SemiMonthOffset -~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthOffset - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthOffset.freqstr - SemiMonthOffset.kwds - SemiMonthOffset.name - SemiMonthOffset.nanos - SemiMonthOffset.normalize - SemiMonthOffset.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthOffset.apply - SemiMonthOffset.apply_index - SemiMonthOffset.copy - SemiMonthOffset.isAnchored - SemiMonthOffset.onOffset - -SemiMonthEnd -~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthEnd.freqstr - SemiMonthEnd.kwds - SemiMonthEnd.name - SemiMonthEnd.nanos - SemiMonthEnd.normalize - SemiMonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthEnd.apply - SemiMonthEnd.apply_index - SemiMonthEnd.copy - SemiMonthEnd.isAnchored - SemiMonthEnd.onOffset - -SemiMonthBegin -~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthBegin.freqstr - SemiMonthBegin.kwds - SemiMonthBegin.name - SemiMonthBegin.nanos - SemiMonthBegin.normalize - SemiMonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - SemiMonthBegin.apply - SemiMonthBegin.apply_index - SemiMonthBegin.copy - SemiMonthBegin.isAnchored - SemiMonthBegin.onOffset - -Week -~~~~ -.. autosummary:: - :toctree: generated/ - - Week - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Week.freqstr - Week.kwds - Week.name - Week.nanos - Week.normalize - Week.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Week.apply - Week.apply_index - Week.copy - Week.isAnchored - Week.onOffset - -WeekOfMonth -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - WeekOfMonth - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - WeekOfMonth.freqstr - WeekOfMonth.kwds - WeekOfMonth.name - WeekOfMonth.nanos - WeekOfMonth.normalize - WeekOfMonth.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - WeekOfMonth.apply - WeekOfMonth.copy - WeekOfMonth.isAnchored - WeekOfMonth.onOffset - -LastWeekOfMonth -~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - LastWeekOfMonth - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - LastWeekOfMonth.freqstr - LastWeekOfMonth.kwds - LastWeekOfMonth.name - LastWeekOfMonth.nanos - LastWeekOfMonth.normalize - LastWeekOfMonth.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - LastWeekOfMonth.apply - LastWeekOfMonth.copy - LastWeekOfMonth.isAnchored - LastWeekOfMonth.onOffset - -QuarterOffset -~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterOffset - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterOffset.freqstr - QuarterOffset.kwds - QuarterOffset.name - QuarterOffset.nanos - QuarterOffset.normalize - QuarterOffset.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterOffset.apply - QuarterOffset.apply_index - QuarterOffset.copy - QuarterOffset.isAnchored - QuarterOffset.onOffset - -BQuarterEnd -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterEnd.freqstr - BQuarterEnd.kwds - BQuarterEnd.name - BQuarterEnd.nanos - BQuarterEnd.normalize - BQuarterEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterEnd.apply - BQuarterEnd.apply_index - BQuarterEnd.copy - BQuarterEnd.isAnchored - BQuarterEnd.onOffset - -BQuarterBegin -~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterBegin.freqstr - BQuarterBegin.kwds - BQuarterBegin.name - BQuarterBegin.nanos - BQuarterBegin.normalize - BQuarterBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BQuarterBegin.apply - BQuarterBegin.apply_index - BQuarterBegin.copy - BQuarterBegin.isAnchored - BQuarterBegin.onOffset - -QuarterEnd -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterEnd.freqstr - QuarterEnd.kwds - QuarterEnd.name - QuarterEnd.nanos - QuarterEnd.normalize - QuarterEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterEnd.apply - QuarterEnd.apply_index - QuarterEnd.copy - QuarterEnd.isAnchored - QuarterEnd.onOffset - -QuarterBegin -~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterBegin.freqstr - QuarterBegin.kwds - QuarterBegin.name - QuarterBegin.nanos - QuarterBegin.normalize - QuarterBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - QuarterBegin.apply - QuarterBegin.apply_index - QuarterBegin.copy - QuarterBegin.isAnchored - QuarterBegin.onOffset - -YearOffset -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearOffset - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearOffset.freqstr - YearOffset.kwds - YearOffset.name - YearOffset.nanos - YearOffset.normalize - YearOffset.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearOffset.apply - YearOffset.apply_index - YearOffset.copy - YearOffset.isAnchored - YearOffset.onOffset - -BYearEnd -~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearEnd.freqstr - BYearEnd.kwds - BYearEnd.name - BYearEnd.nanos - BYearEnd.normalize - BYearEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearEnd.apply - BYearEnd.apply_index - BYearEnd.copy - BYearEnd.isAnchored - BYearEnd.onOffset - -BYearBegin -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearBegin.freqstr - BYearBegin.kwds - BYearBegin.name - BYearBegin.nanos - BYearBegin.normalize - BYearBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BYearBegin.apply - BYearBegin.apply_index - BYearBegin.copy - BYearBegin.isAnchored - BYearBegin.onOffset - -YearEnd -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearEnd.freqstr - YearEnd.kwds - YearEnd.name - YearEnd.nanos - YearEnd.normalize - YearEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearEnd.apply - YearEnd.apply_index - YearEnd.copy - YearEnd.isAnchored - YearEnd.onOffset - -YearBegin -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearBegin.freqstr - YearBegin.kwds - YearBegin.name - YearBegin.nanos - YearBegin.normalize - YearBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - YearBegin.apply - YearBegin.apply_index - YearBegin.copy - YearBegin.isAnchored - YearBegin.onOffset - -FY5253 -~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253 - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253.freqstr - FY5253.kwds - FY5253.name - FY5253.nanos - FY5253.normalize - FY5253.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253.apply - FY5253.copy - FY5253.get_rule_code_suffix - FY5253.get_year_end - FY5253.isAnchored - FY5253.onOffset - -FY5253Quarter -~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253Quarter - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253Quarter.freqstr - FY5253Quarter.kwds - FY5253Quarter.name - FY5253Quarter.nanos - FY5253Quarter.normalize - FY5253Quarter.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - FY5253Quarter.apply - FY5253Quarter.copy - FY5253Quarter.get_weeks - FY5253Quarter.isAnchored - FY5253Quarter.onOffset - FY5253Quarter.year_has_extra_week - -Easter -~~~~~~ -.. autosummary:: - :toctree: generated/ - - Easter - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Easter.freqstr - Easter.kwds - Easter.name - Easter.nanos - Easter.normalize - Easter.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Easter.apply - Easter.copy - Easter.isAnchored - Easter.onOffset - -Tick -~~~~ -.. autosummary:: - :toctree: generated/ - - Tick - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Tick.delta - Tick.freqstr - Tick.kwds - Tick.name - Tick.nanos - Tick.normalize - Tick.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Tick.copy - Tick.isAnchored - Tick.onOffset - -Day -~~~ -.. autosummary:: - :toctree: generated/ - - Day - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Day.delta - Day.freqstr - Day.kwds - Day.name - Day.nanos - Day.normalize - Day.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Day.copy - Day.isAnchored - Day.onOffset - -Hour -~~~~ -.. autosummary:: - :toctree: generated/ - - Hour - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Hour.delta - Hour.freqstr - Hour.kwds - Hour.name - Hour.nanos - Hour.normalize - Hour.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Hour.copy - Hour.isAnchored - Hour.onOffset - -Minute -~~~~~~ -.. autosummary:: - :toctree: generated/ - - Minute - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Minute.delta - Minute.freqstr - Minute.kwds - Minute.name - Minute.nanos - Minute.normalize - Minute.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Minute.copy - Minute.isAnchored - Minute.onOffset - -Second -~~~~~~ -.. autosummary:: - :toctree: generated/ - - Second - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Second.delta - Second.freqstr - Second.kwds - Second.name - Second.nanos - Second.normalize - Second.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Second.copy - Second.isAnchored - Second.onOffset - -Milli -~~~~~ -.. autosummary:: - :toctree: generated/ - - Milli - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Milli.delta - Milli.freqstr - Milli.kwds - Milli.name - Milli.nanos - Milli.normalize - Milli.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Milli.copy - Milli.isAnchored - Milli.onOffset - -Micro -~~~~~ -.. autosummary:: - :toctree: generated/ - - Micro - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Micro.delta - Micro.freqstr - Micro.kwds - Micro.name - Micro.nanos - Micro.normalize - Micro.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Micro.copy - Micro.isAnchored - Micro.onOffset - -Nano -~~~~ -.. autosummary:: - :toctree: generated/ - - Nano - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Nano.delta - Nano.freqstr - Nano.kwds - Nano.name - Nano.nanos - Nano.normalize - Nano.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Nano.copy - Nano.isAnchored - Nano.onOffset - -BDay -~~~~ -.. autosummary:: - :toctree: generated/ - - BDay - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BDay.base - BDay.freqstr - BDay.kwds - BDay.name - BDay.nanos - BDay.normalize - BDay.offset - BDay.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BDay.apply - BDay.apply_index - BDay.copy - BDay.isAnchored - BDay.onOffset - BDay.rollback - BDay.rollforward - -BMonthEnd -~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthEnd.base - BMonthEnd.freqstr - BMonthEnd.kwds - BMonthEnd.name - BMonthEnd.nanos - BMonthEnd.normalize - BMonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthEnd.apply - BMonthEnd.apply_index - BMonthEnd.copy - BMonthEnd.isAnchored - BMonthEnd.onOffset - BMonthEnd.rollback - BMonthEnd.rollforward - -BMonthBegin -~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthBegin.base - BMonthBegin.freqstr - BMonthBegin.kwds - BMonthBegin.name - BMonthBegin.nanos - BMonthBegin.normalize - BMonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - BMonthBegin.apply - BMonthBegin.apply_index - BMonthBegin.copy - BMonthBegin.isAnchored - BMonthBegin.onOffset - BMonthBegin.rollback - BMonthBegin.rollforward - -CBMonthEnd -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthEnd - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthEnd.base - CBMonthEnd.cbday_roll - CBMonthEnd.freqstr - CBMonthEnd.kwds - CBMonthEnd.m_offset - CBMonthEnd.month_roll - CBMonthEnd.name - CBMonthEnd.nanos - CBMonthEnd.normalize - CBMonthEnd.offset - CBMonthEnd.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthEnd.apply - CBMonthEnd.apply_index - CBMonthEnd.copy - CBMonthEnd.isAnchored - CBMonthEnd.onOffset - CBMonthEnd.rollback - CBMonthEnd.rollforward - -CBMonthBegin -~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthBegin - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthBegin.base - CBMonthBegin.cbday_roll - CBMonthBegin.freqstr - CBMonthBegin.kwds - CBMonthBegin.m_offset - CBMonthBegin.month_roll - CBMonthBegin.name - CBMonthBegin.nanos - CBMonthBegin.normalize - CBMonthBegin.offset - CBMonthBegin.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CBMonthBegin.apply - CBMonthBegin.apply_index - CBMonthBegin.copy - CBMonthBegin.isAnchored - CBMonthBegin.onOffset - CBMonthBegin.rollback - CBMonthBegin.rollforward - -CDay -~~~~ -.. autosummary:: - :toctree: generated/ - - CDay - -Properties -~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CDay.base - CDay.freqstr - CDay.kwds - CDay.name - CDay.nanos - CDay.normalize - CDay.offset - CDay.rule_code - -Methods -~~~~~~~ -.. autosummary:: - :toctree: generated/ - - CDay.apply - CDay.apply_index - CDay.copy - CDay.isAnchored - CDay.onOffset - CDay.rollback - CDay.rollforward - -.. _api.frequencies: - -Frequencies ------------ - -.. currentmodule:: pandas.tseries.frequencies - -.. _api.offsets: - -.. autosummary:: - :toctree: generated/ - - to_offset - - -Window ------- - -.. currentmodule:: pandas.core.window - -Rolling objects are returned by ``.rolling`` calls: :func:`pandas.DataFrame.rolling`, :func:`pandas.Series.rolling`, etc. -Expanding objects are returned by ``.expanding`` calls: :func:`pandas.DataFrame.expanding`, :func:`pandas.Series.expanding`, etc. -EWM objects are returned by ``.ewm`` calls: :func:`pandas.DataFrame.ewm`, :func:`pandas.Series.ewm`, etc. - -Standard moving window functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. currentmodule:: pandas.core.window - -.. autosummary:: - :toctree: generated/ - - Rolling.count - Rolling.sum - Rolling.mean - Rolling.median - Rolling.var - Rolling.std - Rolling.min - Rolling.max - Rolling.corr - Rolling.cov - Rolling.skew - Rolling.kurt - Rolling.apply - Rolling.aggregate - Rolling.quantile - Window.mean - Window.sum - -.. _api.functions_expanding: - -Standard expanding window functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. currentmodule:: pandas.core.window - -.. autosummary:: - :toctree: generated/ - - Expanding.count - Expanding.sum - Expanding.mean - Expanding.median - Expanding.var - Expanding.std - Expanding.min - Expanding.max - Expanding.corr - Expanding.cov - Expanding.skew - Expanding.kurt - Expanding.apply - Expanding.aggregate - Expanding.quantile - -Exponentially-weighted moving window functions -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. currentmodule:: pandas.core.window - -.. autosummary:: - :toctree: generated/ - - EWM.mean - EWM.std - EWM.var - EWM.corr - EWM.cov - -GroupBy -------- -.. currentmodule:: pandas.core.groupby - -GroupBy objects are returned by groupby calls: :func:`pandas.DataFrame.groupby`, :func:`pandas.Series.groupby`, etc. - -Indexing, iteration -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - GroupBy.__iter__ - GroupBy.groups - GroupBy.indices - GroupBy.get_group - -.. currentmodule:: pandas - -.. autosummary:: - :toctree: generated/ - :template: autosummary/class_without_autosummary.rst - - Grouper - -.. currentmodule:: pandas.core.groupby - -Function application -~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - GroupBy.apply - GroupBy.agg - GroupBy.aggregate - GroupBy.transform - GroupBy.pipe - -Computations / Descriptive Stats -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - GroupBy.all - GroupBy.any - GroupBy.bfill - GroupBy.count - GroupBy.cumcount - GroupBy.ffill - GroupBy.first - GroupBy.head - GroupBy.last - GroupBy.max - GroupBy.mean - GroupBy.median - GroupBy.min - GroupBy.ngroup - GroupBy.nth - GroupBy.ohlc - GroupBy.prod - GroupBy.rank - GroupBy.pct_change - GroupBy.size - GroupBy.sem - GroupBy.std - GroupBy.sum - GroupBy.var - GroupBy.tail - -The following methods are available in both ``SeriesGroupBy`` and -``DataFrameGroupBy`` objects, but may differ slightly, usually in that -the ``DataFrameGroupBy`` version usually permits the specification of an -axis argument, and often an argument indicating whether to restrict -application to columns of a specific data type. - -.. autosummary:: - :toctree: generated/ - - DataFrameGroupBy.all - DataFrameGroupBy.any - DataFrameGroupBy.bfill - DataFrameGroupBy.corr - DataFrameGroupBy.count - DataFrameGroupBy.cov - DataFrameGroupBy.cummax - DataFrameGroupBy.cummin - DataFrameGroupBy.cumprod - DataFrameGroupBy.cumsum - DataFrameGroupBy.describe - DataFrameGroupBy.diff - DataFrameGroupBy.ffill - DataFrameGroupBy.fillna - DataFrameGroupBy.filter - DataFrameGroupBy.hist - DataFrameGroupBy.idxmax - DataFrameGroupBy.idxmin - DataFrameGroupBy.mad - DataFrameGroupBy.pct_change - DataFrameGroupBy.plot - DataFrameGroupBy.quantile - DataFrameGroupBy.rank - DataFrameGroupBy.resample - DataFrameGroupBy.shift - DataFrameGroupBy.size - DataFrameGroupBy.skew - DataFrameGroupBy.take - DataFrameGroupBy.tshift - -The following methods are available only for ``SeriesGroupBy`` objects. - -.. autosummary:: - :toctree: generated/ - - SeriesGroupBy.nlargest - SeriesGroupBy.nsmallest - SeriesGroupBy.nunique - SeriesGroupBy.unique - SeriesGroupBy.value_counts - SeriesGroupBy.is_monotonic_increasing - SeriesGroupBy.is_monotonic_decreasing - -The following methods are available only for ``DataFrameGroupBy`` objects. - -.. autosummary:: - :toctree: generated/ - - DataFrameGroupBy.corrwith - DataFrameGroupBy.boxplot - -Resampling ----------- -.. currentmodule:: pandas.core.resample - -Resampler objects are returned by resample calls: :func:`pandas.DataFrame.resample`, :func:`pandas.Series.resample`. - -Indexing, iteration -~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Resampler.__iter__ - Resampler.groups - Resampler.indices - Resampler.get_group - -Function application -~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Resampler.apply - Resampler.aggregate - Resampler.transform - Resampler.pipe - -Upsampling -~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - Resampler.ffill - Resampler.backfill - Resampler.bfill - Resampler.pad - Resampler.nearest - Resampler.fillna - Resampler.asfreq - Resampler.interpolate - -Computations / Descriptive Stats -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Resampler.count - Resampler.nunique - Resampler.first - Resampler.last - Resampler.max - Resampler.mean - Resampler.median - Resampler.min - Resampler.ohlc - Resampler.prod - Resampler.size - Resampler.sem - Resampler.std - Resampler.sum - Resampler.var - Resampler.quantile - -Style ------ -.. currentmodule:: pandas.io.formats.style - -``Styler`` objects are returned by :attr:`pandas.DataFrame.style`. - -Styler Constructor -~~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Styler - Styler.from_custom_template - - -Styler Attributes -~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Styler.env - Styler.template - Styler.loader - -Style Application -~~~~~~~~~~~~~~~~~ -.. autosummary:: - :toctree: generated/ - - Styler.apply - Styler.applymap - Styler.where - Styler.format - Styler.set_precision - Styler.set_table_styles - Styler.set_table_attributes - Styler.set_caption - Styler.set_properties - Styler.set_uuid - Styler.clear - Styler.pipe - -Builtin Styles -~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - Styler.highlight_max - Styler.highlight_min - Styler.highlight_null - Styler.background_gradient - Styler.bar - -Style Export and Import -~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - Styler.render - Styler.export - Styler.use - Styler.to_excel - -Plotting --------- - -.. currentmodule:: pandas.plotting - -The following functions are contained in the `pandas.plotting` module. - -.. autosummary:: - :toctree: generated/ - - andrews_curves - bootstrap_plot - deregister_matplotlib_converters - lag_plot - parallel_coordinates - radviz - register_matplotlib_converters - scatter_matrix - -.. currentmodule:: pandas - -General utility functions -------------------------- - -Working with options -~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - describe_option - reset_option - get_option - set_option - option_context - -Testing functions -~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - testing.assert_frame_equal - testing.assert_series_equal - testing.assert_index_equal - - -Exceptions and warnings -~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - errors.DtypeWarning - errors.EmptyDataError - errors.OutOfBoundsDatetime - errors.ParserError - errors.ParserWarning - errors.PerformanceWarning - errors.UnsortedIndexError - errors.UnsupportedFunctionCall - - -Data types related functionality -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. autosummary:: - :toctree: generated/ - - api.types.union_categoricals - api.types.infer_dtype - api.types.pandas_dtype - -Dtype introspection - -.. autosummary:: - :toctree: generated/ - - api.types.is_bool_dtype - api.types.is_categorical_dtype - api.types.is_complex_dtype - api.types.is_datetime64_any_dtype - api.types.is_datetime64_dtype - api.types.is_datetime64_ns_dtype - api.types.is_datetime64tz_dtype - api.types.is_extension_type - api.types.is_float_dtype - api.types.is_int64_dtype - api.types.is_integer_dtype - api.types.is_interval_dtype - api.types.is_numeric_dtype - api.types.is_object_dtype - api.types.is_period_dtype - api.types.is_signed_integer_dtype - api.types.is_string_dtype - api.types.is_timedelta64_dtype - api.types.is_timedelta64_ns_dtype - api.types.is_unsigned_integer_dtype - api.types.is_sparse - -Iterable introspection - -.. autosummary:: - :toctree: generated/ - - api.types.is_dict_like - api.types.is_file_like - api.types.is_list_like - api.types.is_named_tuple - api.types.is_iterator - -Scalar introspection - -.. autosummary:: - :toctree: generated/ - - api.types.is_bool - api.types.is_categorical - api.types.is_complex - api.types.is_datetimetz - api.types.is_float - api.types.is_hashable - api.types.is_integer - api.types.is_interval - api.types.is_number - api.types.is_period - api.types.is_re - api.types.is_re_compilable - api.types.is_scalar - -Extensions ----------- - -These are primarily intended for library authors looking to extend pandas -objects. - -.. currentmodule:: pandas - -.. autosummary:: - :toctree: generated/ - - api.extensions.register_extension_dtype - api.extensions.register_dataframe_accessor - api.extensions.register_series_accessor - api.extensions.register_index_accessor - api.extensions.ExtensionDtype - api.extensions.ExtensionArray - arrays.PandasArray - -.. This is to prevent warnings in the doc build. We don't want to encourage -.. these methods. - -.. toctree:: - :hidden: - - generated/pandas.DataFrame.blocks - generated/pandas.DataFrame.as_matrix - generated/pandas.DataFrame.ix - generated/pandas.Index.asi8 - generated/pandas.Index.data - generated/pandas.Index.flags - generated/pandas.Index.holds_integer - generated/pandas.Index.is_type_compatible - generated/pandas.Index.nlevels - generated/pandas.Index.sort - generated/pandas.Panel.agg - generated/pandas.Panel.aggregate - generated/pandas.Panel.blocks - generated/pandas.Panel.empty - generated/pandas.Panel.is_copy - generated/pandas.Panel.items - generated/pandas.Panel.ix - generated/pandas.Panel.major_axis - generated/pandas.Panel.minor_axis - generated/pandas.Series.asobject - generated/pandas.Series.blocks - generated/pandas.Series.from_array - generated/pandas.Series.ix - generated/pandas.Series.imag - generated/pandas.Series.real - - -.. Can't convince sphinx to generate toctree for this class attribute. -.. So we do it manually to avoid a warning - -.. toctree:: - :hidden: - - generated/pandas.api.extensions.ExtensionDtype.na_value From 541e816bd3ab934c83415ad64b50d0592f1f041a Mon Sep 17 00:00:00 2001 From: Jeff Reback Date: Sat, 5 Jan 2019 16:23:09 -0500 Subject: [PATCH 19/19] doc-string --- pandas/core/series.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pandas/core/series.py b/pandas/core/series.py index ff998c7f7449e..eb412add7bbbb 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -541,6 +541,7 @@ def nonzero(self): Return the *integer* indices of the elements that are non-zero. .. deprecated:: 0.24.0 + Please use .to_numpy().nonzero() as a replacement. This method is equivalent to calling `numpy.nonzero` on the series data. For compatibility with NumPy, the return value is