From e83d94020fb904165ed29b8416bd00f9622f7ebf Mon Sep 17 00:00:00 2001 From: tp Date: Thu, 19 Oct 2017 21:56:18 +0100 Subject: [PATCH] Removed references to v0.17 in docs and doc strings. Also removes a reference to 0.13. --- doc/source/basics.rst | 9 +----- doc/source/categorical.rst | 2 -- doc/source/computation.rst | 2 -- doc/source/contributing.rst | 8 ++--- doc/source/ecosystem.rst | 5 ++- doc/source/gotchas.rst | 2 -- doc/source/indexing.rst | 2 -- doc/source/io.rst | 50 ++--------------------------- doc/source/merging.rst | 6 +--- doc/source/missing_data.rst | 4 --- doc/source/remote_data.rst | 2 +- doc/source/timeseries.rst | 9 +----- doc/source/visualization.rst | 2 -- pandas/core/frame.py | 10 ------ pandas/core/generic.py | 10 ------ pandas/core/indexes/base.py | 2 -- pandas/core/indexes/datetimelike.py | 2 -- pandas/core/indexes/datetimes.py | 4 +-- pandas/core/indexes/timedeltas.py | 2 -- pandas/io/formats/style.py | 41 +---------------------- pandas/io/sas/sas_xport.py | 1 - pandas/plotting/_core.py | 36 --------------------- pandas/tseries/offsets.py | 2 -- 23 files changed, 17 insertions(+), 196 deletions(-) diff --git a/doc/source/basics.rst b/doc/source/basics.rst index f5c9e1d78e0fc..9318df2b76564 100644 --- a/doc/source/basics.rst +++ b/doc/source/basics.rst @@ -1738,11 +1738,6 @@ description. Sorting ------- -.. warning:: - - The sorting API is substantially changed in 0.17.0, see :ref:`here ` for these changes. - In particular, all sorting methods now return a new object by default, and **DO NOT** operate in-place (except by passing ``inplace=True``). - There are two obvious kinds of sorting that you may be interested in: sorting by label and sorting by actual values. @@ -1829,8 +1824,6 @@ faster than sorting the entire Series and calling ``head(n)`` on the result. s.nsmallest(3) s.nlargest(3) -.. versionadded:: 0.17.0 - ``DataFrame`` also has the ``nlargest`` and ``nsmallest`` methods. .. ipython:: python @@ -1881,7 +1874,7 @@ dtypes ------ The main types stored in pandas objects are ``float``, ``int``, ``bool``, -``datetime64[ns]`` and ``datetime64[ns, tz]`` (in >= 0.17.0), ``timedelta[ns]``, +``datetime64[ns]`` and ``datetime64[ns, tz]``, ``timedelta[ns]``, ``category`` and ``object``. In addition these dtypes have item sizes, e.g. ``int64`` and ``int32``. See :ref:`Series with TZ ` for more detail on ``datetime64[ns, tz]`` dtypes. diff --git a/doc/source/categorical.rst b/doc/source/categorical.rst index c5bbc3c004675..2acc919d1fbdf 100644 --- a/doc/source/categorical.rst +++ b/doc/source/categorical.rst @@ -632,8 +632,6 @@ To get a single value `Series` of type ``category`` pass in a list with a single String and datetime accessors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 0.17.1 - The accessors ``.dt`` and ``.str`` will work if the ``s.cat.categories`` are of an appropriate type: diff --git a/doc/source/computation.rst b/doc/source/computation.rst index 466ac3c9cbf51..0325e54d18e36 100644 --- a/doc/source/computation.rst +++ b/doc/source/computation.rst @@ -206,8 +206,6 @@ Window Functions functions and are now deprecated. These are replaced by using the :class:`~pandas.core.window.Rolling`, :class:`~pandas.core.window.Expanding` and :class:`~pandas.core.window.EWM`. objects and a corresponding method call. The deprecation warning will show the new syntax, see an example :ref:`here ` - You can view the previous documentation - `here `__ For working with data, a number of windows functions are provided for computing common *window* or *rolling* statistics. Among these are count, sum, diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index d8d57a8bfffdd..e345f79dad5c2 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -877,12 +877,12 @@ directive is used. The sphinx syntax for that is: .. code-block:: rst - .. versionadded:: 0.17.0 + .. versionadded:: 0.21.0 -This will put the text *New in version 0.17.0* wherever you put the sphinx +This will put the text *New in version 0.21.0* wherever you put the sphinx directive. This should also be put in the docstring when adding a new function -or method (`example `__) -or a new keyword argument (`example `__). +or method (`example `__) +or a new keyword argument (`example `__). Contributing your changes to *pandas* ===================================== diff --git a/doc/source/ecosystem.rst b/doc/source/ecosystem.rst index 2348a3d10c54f..ac8216d572ddd 100644 --- a/doc/source/ecosystem.rst +++ b/doc/source/ecosystem.rst @@ -146,7 +146,10 @@ API `pandas-datareader `__ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``pandas-datareader`` is a remote data access library for pandas. ``pandas.io`` from pandas < 0.17.0 is now refactored/split-off to and importable from ``pandas_datareader`` (PyPI:``pandas-datareader``). Many/most of the supported APIs have at least a documentation paragraph in the `pandas-datareader docs `_: +``pandas-datareader`` is a remote data access library for pandas (PyPI:``pandas-datareader``). +It is based on functionality that was located in ``pandas.io.data`` and ``pandas.io.wb`` but was +split off in v0.19. +See more in the `pandas-datareader docs `_: The following data feeds are available: diff --git a/doc/source/gotchas.rst b/doc/source/gotchas.rst index 8ae830d7fd76b..5da0f4fd07819 100644 --- a/doc/source/gotchas.rst +++ b/doc/source/gotchas.rst @@ -47,8 +47,6 @@ The ``+`` symbol indicates that the true memory usage could be higher, because pandas does not count the memory used by values in columns with ``dtype=object``. -.. versionadded:: 0.17.1 - Passing ``memory_usage='deep'`` will enable a more accurate memory usage report, that accounts for the full usage of the contained objects. This is optional as it can be expensive to do this deeper introspection. diff --git a/doc/source/indexing.rst b/doc/source/indexing.rst index fdb002a642d62..2f9f7a04def19 100644 --- a/doc/source/indexing.rst +++ b/doc/source/indexing.rst @@ -1632,8 +1632,6 @@ Missing values .. _indexing.missing: -.. versionadded:: 0.17.1 - .. important:: Even though ``Index`` can hold missing values (``NaN``), it should be avoided diff --git a/doc/source/io.rst b/doc/source/io.rst index 82cb83c168b22..8656e617b8173 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -2689,11 +2689,6 @@ of sheet names can simply be passed to ``read_excel`` with no loss in performanc # equivalent using the read_excel function data = read_excel('path_to_file.xls', ['Sheet1', 'Sheet2'], index_col=None, na_values=['NA']) -.. versionadded:: 0.17 - -``read_excel`` can take an ``ExcelFile`` object as input - - .. _io.excel.specifying_sheets: Specifying Sheets @@ -2754,8 +2749,6 @@ respectively. Reading a ``MultiIndex`` ++++++++++++++++++++++++ -.. versionadded:: 0.17 - ``read_excel`` can read a ``MultiIndex`` index, by passing a list of columns to ``index_col`` and a ``MultiIndex`` column by passing a list of rows to ``header``. If either the ``index`` or ``columns`` have serialized level names those will be read in as well by specifying @@ -2928,14 +2921,8 @@ one can pass an :class:`~pandas.io.excel.ExcelWriter`. Writing Excel Files to Memory +++++++++++++++++++++++++++++ -.. versionadded:: 0.17 - Pandas supports writing Excel files to buffer-like objects such as ``StringIO`` or -``BytesIO`` using :class:`~pandas.io.excel.ExcelWriter`. - -.. versionadded:: 0.17 - -Added support for Openpyxl >= 2.2 +``BytesIO`` using :class:`~pandas.io.excel.ExcelWriter`. Pandas also supports Openpyxl >= 2.2. .. code-block:: python @@ -3191,25 +3178,6 @@ both on the writing (serialization), and reading (deserialization). optimizations in the io of the ``msgpack`` data. Since this is marked as an EXPERIMENTAL LIBRARY, the storage format may not be stable until a future release. - As a result of writing format changes and other issues: - - +----------------------+------------------------+ - | Packed with | Can be unpacked with | - +======================+========================+ - | pre-0.17 / Python 2 | any | - +----------------------+------------------------+ - | pre-0.17 / Python 3 | any | - +----------------------+------------------------+ - | 0.17 / Python 2 | - 0.17 / Python 2 | - | | - >=0.18 / any Python | - +----------------------+------------------------+ - | 0.17 / Python 3 | >=0.18 / any Python | - +----------------------+------------------------+ - | 0.18 | >= 0.18 | - +----------------------+------------------------+ - - Reading (files packed by older versions) is backward-compatibile, except for files packed with 0.17 in Python 2, in which case only they can only be unpacked in Python 2. - .. ipython:: python df = pd.DataFrame(np.random.rand(5,2),columns=list('AB')) @@ -3287,10 +3255,6 @@ for some advanced strategies If you see a subset of results being returned, upgrade to ``PyTables`` >= 3.2. Stores created previously will need to be rewritten using the updated version. -.. warning:: - - As of version 0.17.0, ``HDFStore`` will not drop rows that have all missing values by default. Previously, if all values (except the index) were missing, ``HDFStore`` would not write those rows to disk. - .. ipython:: python :suppress: :okexcept: @@ -3388,7 +3352,7 @@ similar to how ``read_csv`` and ``to_csv`` work. os.remove('store_tl.h5') -As of version 0.17.0, HDFStore will no longer drop rows that are all missing by default. This behavior can be enabled by setting ``dropna=True``. +HDFStore will by default not drop rows that are all missing. This behavior can be changed by setting ``dropna=True``. .. ipython:: python :suppress: @@ -3632,12 +3596,6 @@ Querying Querying a Table ++++++++++++++++ -.. warning:: - - This query capabilities have changed substantially starting in ``0.13.0``. - Queries from prior version are accepted (with a ``DeprecationWarning``) printed - if its not string-like. - ``select`` and ``delete`` operations have an optional criterion that can be specified to select/delete only a subset of the data. This allows one to have a very large on-disk table and retrieve only a portion of the @@ -5098,10 +5056,8 @@ whether imported ``Categorical`` variables are ordered. SAS Formats ----------- -.. versionadded:: 0.17.0 - The top-level function :func:`read_sas` can read (but not write) SAS -`xport` (.XPT) and `SAS7BDAT` (.sas7bdat) format files were added in *v0.18.0*. +`xport` (.XPT) and (since *v0.18.0*) `SAS7BDAT` (.sas7bdat) format files. SAS files only contain two value types: ASCII text and floating point values (usually 8 bytes but sometimes truncated). For xport files, diff --git a/doc/source/merging.rst b/doc/source/merging.rst index ad40c75a62722..7d981b815d01b 100644 --- a/doc/source/merging.rst +++ b/doc/source/merging.rst @@ -550,8 +550,6 @@ standard database join operations between DataFrame objects: merge key only appears in ``'right'`` DataFrame, and ``both`` if the observation's merge key is found in both. - .. versionadded:: 0.17.0 - - ``validate`` : string, default None. If specified, checks if merge is of specified type. @@ -766,9 +764,7 @@ If the user is aware of the duplicates in the right `DataFrame` but wants to ens The merge indicator ~~~~~~~~~~~~~~~~~~~ -.. versionadded:: 0.17.0 - -``merge`` now accepts the argument ``indicator``. If ``True``, a Categorical-type column called ``_merge`` will be added to the output object that takes on values: +``merge`` accepts the argument ``indicator``. If ``True``, a Categorical-type column called ``_merge`` will be added to the output object that takes on values: =================================== ================ Observation Origin ``_merge`` value diff --git a/doc/source/missing_data.rst b/doc/source/missing_data.rst index b4ee91ea33405..f968cdad100ba 100644 --- a/doc/source/missing_data.rst +++ b/doc/source/missing_data.rst @@ -352,10 +352,6 @@ examined :ref:`in the API `. Interpolation ~~~~~~~~~~~~~ -.. versionadded:: 0.17.0 - - The ``limit_direction`` keyword argument was added. - Both Series and DataFrame objects have an ``interpolate`` method that, by default, performs linear interpolation at missing datapoints. diff --git a/doc/source/remote_data.rst b/doc/source/remote_data.rst index aba70ccbcc9fb..5054bb7bcd12e 100644 --- a/doc/source/remote_data.rst +++ b/doc/source/remote_data.rst @@ -11,7 +11,7 @@ Remote Data Access DataReader ---------- -The sub-package ``pandas.io.data`` was deprecated in v.0.17 and removed in +The sub-package ``pandas.io.data`` was removed in `v.0.19 `__. Instead there has been created a separately installable `pandas-datareader package `__. diff --git a/doc/source/timeseries.rst b/doc/source/timeseries.rst index 9ca8df35cccdc..26e701d008b3f 100644 --- a/doc/source/timeseries.rst +++ b/doc/source/timeseries.rst @@ -229,12 +229,7 @@ You can pass only the columns that you need to assemble. Invalid Data ~~~~~~~~~~~~ -.. note:: - - In version 0.17.0, the default for ``to_datetime`` is now ``errors='raise'``, rather than ``errors='ignore'``. This means - that invalid parsing will raise rather that return the original input as in previous versions. - -The default behavior, ``errors='raise'``, is to raise when unparseable: +The default behavior, ``errors='raise'``, is to raise when unparseable: .. code-block:: ipython @@ -2230,8 +2225,6 @@ constructor as well as ``tz_localize``. TZ Aware Dtypes ~~~~~~~~~~~~~~~ -.. versionadded:: 0.17.0 - ``Series/DatetimeIndex`` with a timezone **naive** value are represented with a dtype of ``datetime64[ns]``. .. ipython:: python diff --git a/doc/source/visualization.rst b/doc/source/visualization.rst index 7db3b63fd8f08..ea720a9ae4ed0 100644 --- a/doc/source/visualization.rst +++ b/doc/source/visualization.rst @@ -129,8 +129,6 @@ For example, a bar plot can be created the following way: @savefig bar_plot_ex.png df.iloc[5].plot(kind='bar'); -.. versionadded:: 0.17.0 - You can also create these other plots using the methods ``DataFrame.plot.`` instead of providing the ``kind`` keyword argument. This makes it easier to discover plot methods and the specific arguments they use: .. ipython:: diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a1af806e5cb9e..c6f7f9ea2eb37 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -182,8 +182,6 @@ "right_only" for observations whose merge key only appears in 'right' DataFrame, and "both" if the observation's merge key is found in both. - .. versionadded:: 0.17.0 - validate : string, default None If specified, checks if merge is of specified type. @@ -916,8 +914,6 @@ def to_dict(self, orient='dict', into=dict): [{column -> value}, ... , {column -> value}] - index : dict like {index -> {column -> value}} - .. versionadded:: 0.17.0 - Abbreviations are allowed. `s` indicates `series` and `sp` indicates `split`. @@ -3743,8 +3739,6 @@ def nlargest(self, n, columns, keep='first'): """Get the rows of a DataFrame sorted by the `n` largest values of `columns`. - .. versionadded:: 0.17.0 - Parameters ---------- n : int @@ -3780,8 +3774,6 @@ def nsmallest(self, n, columns, keep='first'): """Get the rows of a DataFrame sorted by the `n` smallest values of `columns`. - .. versionadded:: 0.17.0 - Parameters ---------- n : int @@ -5350,8 +5342,6 @@ def round(self, decimals=0, *args, **kwargs): """ Round a DataFrame to a variable number of decimal places. - .. versionadded:: 0.17.0 - Parameters ---------- decimals : int, dict, Series diff --git a/pandas/core/generic.py b/pandas/core/generic.py index 10a1d922e0457..14bf9710fca6a 100644 --- a/pandas/core/generic.py +++ b/pandas/core/generic.py @@ -2415,7 +2415,6 @@ def reindex_like(self, other, method=None, copy=True, limit=None, Maximum distance between labels of the other object and this object for inexact matches. Can be list-like. - .. versionadded:: 0.17.0 .. versionadded:: 0.21.0 (list-like tolerance) Notes @@ -2622,8 +2621,6 @@ def add_suffix(self, suffix): _shared_docs['sort_values'] = """ Sort by the values along either axis - .. versionadded:: 0.17.0 - Parameters ----------%(optional_by)s axis : %(axes_single_arg)s, default 0 @@ -2810,7 +2807,6 @@ def sort_index(self, axis=0, level=None, ascending=True, inplace=False, the same size as the index and its dtype must exactly match the index's type. - .. versionadded:: 0.17.0 .. versionadded:: 0.21.0 (list-like tolerance) Examples @@ -3077,7 +3073,6 @@ def _reindex_multi(self, axes, copy, fill_value): the same size as the index and its dtype must exactly match the index's type. - .. versionadded:: 0.17.0 .. versionadded:: 0.21.0 (list-like tolerance) Examples @@ -4658,9 +4653,6 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None, limit_direction : {'forward', 'backward', 'both'}, default 'forward' If limit is specified, consecutive NaNs will be filled in this direction. - - .. versionadded:: 0.17.0 - inplace : bool, default False Update the NDFrame in place if possible. downcast : optional, 'infer' or None, defaults to None @@ -5667,8 +5659,6 @@ def ranker(data): Broadcast values along this axis, if aligning two objects of different dimensions - .. versionadded:: 0.17.0 - Returns ------- (left, right) : (%(klass)s, type of other) diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index a995fc10a6674..8ad4c08a0e8da 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -2490,7 +2490,6 @@ def _get_unique_index(self, dropna=False): includes list, tuple, array, Series, and must be the same size as the index and its dtype must exactly match the index's type. - .. versionadded:: 0.17.0 .. versionadded:: 0.21.0 (list-like tolerance) Returns @@ -2640,7 +2639,6 @@ def _get_level_values(self, level): the same size as the index and its dtype must exactly match the index's type. - .. versionadded:: 0.17.0 .. versionadded:: 0.21.0 (list-like tolerance) Examples diff --git a/pandas/core/indexes/datetimelike.py b/pandas/core/indexes/datetimelike.py index 71de6c7c3e8cf..cc9361b550c5b 100644 --- a/pandas/core/indexes/datetimelike.py +++ b/pandas/core/indexes/datetimelike.py @@ -47,8 +47,6 @@ def strftime(self, date_format): supports the same string format as the python standard library. Details of the string format can be found in `python string format doc <{0}>`__ - .. versionadded:: 0.17.0 - Parameters ---------- date_format : str diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index 18be6c61abdf7..26e8d12c98660 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -1016,12 +1016,10 @@ def union(self, other): def to_perioddelta(self, freq): """ - Calcuates TimedeltaIndex of difference between index + Calculates TimedeltaIndex of difference between index values and index converted to PeriodIndex at specified freq. Used for vectorized offsets - .. versionadded:: 0.17.0 - Parameters ---------- freq : Period frequency diff --git a/pandas/core/indexes/timedeltas.py b/pandas/core/indexes/timedeltas.py index 6e08c32f30dcd..9647cef608d4e 100644 --- a/pandas/core/indexes/timedeltas.py +++ b/pandas/core/indexes/timedeltas.py @@ -454,8 +454,6 @@ def f(x): def total_seconds(self): """ Total duration of each element expressed in seconds. - - .. versionadded:: 0.17.0 """ return Index(self._maybe_mask_results(1e-9 * self.asi8), name=self.name) diff --git a/pandas/io/formats/style.py b/pandas/io/formats/style.py index 2e87b3b925edd..776669d6d28db 100644 --- a/pandas/io/formats/style.py +++ b/pandas/io/formats/style.py @@ -52,13 +52,6 @@ class Styler(object): Helps style a DataFrame or Series according to the data with HTML and CSS. - .. versionadded:: 0.17.1 - - .. warning:: - This is a new feature and is under active development. - We'll be adding features and possibly making breaking changes in future - releases. - Parameters ---------- data: Series or DataFrame @@ -396,8 +389,6 @@ def render(self, **kwargs): r""" Render the built up styles to HTML - .. versionadded:: 0.17.1 - Parameters ---------- **kwargs: @@ -541,8 +532,6 @@ def apply(self, func, axis=0, subset=None, **kwargs): Apply a function column-wise, row-wise, or table-wase, updating the HTML representation with the result. - .. versionadded:: 0.17.1 - Parameters ---------- func : function @@ -601,8 +590,6 @@ def applymap(self, func, subset=None, **kwargs): Apply a function elementwise, updating the HTML representation with the result. - .. versionadded:: 0.17.1 - Parameters ---------- func : function @@ -668,8 +655,6 @@ def set_precision(self, precision): """ Set the precision used to render. - .. versionadded:: 0.17.1 - Parameters ---------- precision: int @@ -687,8 +672,6 @@ def set_table_attributes(self, attributes): that show up in the opening ```` tag in addition to to automatic (by default) id. - .. versionadded:: 0.17.1 - Parameters ---------- attributes : string @@ -711,8 +694,6 @@ def export(self): Export the styles to applied to the current Styler. Can be applied to a second style with ``Styler.use``. - .. versionadded:: 0.17.1 - Returns ------- styles: list @@ -728,8 +709,6 @@ def use(self, styles): Set the styles on the current Styler, possibly using styles from ``Styler.export``. - .. versionadded:: 0.17.1 - Parameters ---------- styles: list @@ -750,8 +729,6 @@ def set_uuid(self, uuid): """ Set the uuid for a Styler. - .. versionadded:: 0.17.1 - Parameters ---------- uuid: str @@ -767,8 +744,6 @@ def set_caption(self, caption): """ Se the caption on a Styler - .. versionadded:: 0.17.1 - Parameters ---------- caption: str @@ -785,8 +760,6 @@ def set_table_styles(self, table_styles): Set the table styles on a Styler. These are placed in a ``