Skip to content

Commit f207219

Browse files
author
tp
committed
cleaned references to pandas v0.15 and v0.16 in docs
1 parent 5bca6ce commit f207219

18 files changed

+53
-180
lines changed

doc/source/10min.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ the quarter end:
655655
Categoricals
656656
------------
657657

658-
Since version 0.15, pandas can include categorical data in a ``DataFrame``. For full docs, see the
658+
pandas can include categorical data in a ``DataFrame``. For full docs, see the
659659
:ref:`categorical introduction <categorical>` and the :ref:`API documentation <api.categorical>`.
660660

661661
.. ipython:: python

doc/source/advanced.rst

+3-12
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ See the :ref:`Indexing and Selecting Data <indexing>` for general indexing docum
2626
should be avoided. See :ref:`Returning a View versus Copy
2727
<indexing.view_versus_copy>`
2828

29-
.. warning::
30-
31-
In 0.15.0 ``Index`` has internally been refactored to no longer sub-class ``ndarray``
32-
but instead subclass ``PandasObject``, similarly to the rest of the pandas objects. This should be
33-
a transparent change with only very limited API implications (See the :ref:`Internal Refactoring <whatsnew_0150.refactoring>`)
34-
3529
See the :ref:`cookbook<cookbook.selection>` for some advanced strategies
3630

3731
.. _advanced.hierarchical:
@@ -638,12 +632,9 @@ In the following sub-sections we will highlite some other index types.
638632
CategoricalIndex
639633
~~~~~~~~~~~~~~~~
640634

641-
.. versionadded:: 0.16.1
642-
643-
We introduce a ``CategoricalIndex``, a new type of index object that is useful for supporting
644-
indexing with duplicates. This is a container around a ``Categorical`` (introduced in v0.15.0)
645-
and allows efficient indexing and storage of an index with a large number of duplicated elements. Prior to 0.16.1,
646-
setting the index of a ``DataFrame/Series`` with a ``category`` dtype would convert this to regular object-based ``Index``.
635+
``CategoricalIndex`` is a type of index that is useful for supporting
636+
indexing with duplicates. This is a container around a ``Categorical``
637+
and allows efficient indexing and storage of an index with a large number of duplicated elements.
647638

648639
.. ipython:: python
649640

doc/source/basics.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -719,8 +719,6 @@ on an entire ``DataFrame`` or ``Series``, row- or column-wise, or elementwise.
719719
Tablewise Function Application
720720
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
721721

722-
.. versionadded:: 0.16.2
723-
724722
``DataFrames`` and ``Series`` can of course just be passed into functions.
725723
However, if the function needs to be called in a chain, consider using the :meth:`~DataFrame.pipe` method.
726724
Compare the following
@@ -1860,8 +1858,10 @@ dtypes
18601858
------
18611859

18621860
The main types stored in pandas objects are ``float``, ``int``, ``bool``,
1863-
``datetime64[ns]`` and ``datetime64[ns, tz]`` (in >= 0.17.0), ``timedelta[ns]``, ``category`` (in >= 0.15.0), and ``object``. In addition these dtypes
1864-
have item sizes, e.g. ``int64`` and ``int32``. See :ref:`Series with TZ <timeseries.timezone_series>` for more detail on ``datetime64[ns, tz]`` dtypes.
1861+
``datetime64[ns]`` and ``datetime64[ns, tz]`` (in >= 0.17.0), ``timedelta[ns]``,
1862+
``category`` and ``object``. In addition these dtypes have item sizes, e.g.
1863+
``int64`` and ``int32``. See :ref:`Series with TZ <timeseries.timezone_series>`
1864+
for more detail on ``datetime64[ns, tz]`` dtypes.
18651865

18661866
A convenient :attr:`~DataFrame.dtypes` attribute for DataFrames returns a Series with the data type of each column.
18671867

doc/source/categorical.rst

+10-54
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@
1616
Categorical Data
1717
****************
1818

19-
.. versionadded:: 0.15
20-
21-
.. note::
22-
While there was `pandas.Categorical` in earlier versions, the ability to use
23-
categorical data in `Series` and `DataFrame` is new.
24-
25-
2619
This is an introduction to pandas categorical data type, including a short comparison
2720
with R's ``factor``.
2821

@@ -295,10 +288,6 @@ Sorting and Order
295288

296289
.. _categorical.sort:
297290

298-
.. warning::
299-
300-
The default for construction has changed in v0.16.0 to ``ordered=False``, from the prior implicit ``ordered=True``
301-
302291
If categorical data is ordered (``s.cat.ordered == True``), then the order of the categories has a
303292
meaning and certain operations are possible. If the categorical is unordered, ``.min()/.max()`` will raise a `TypeError`.
304293

@@ -803,13 +792,11 @@ Following table summarizes the results of ``Categoricals`` related concatenation
803792
Getting Data In/Out
804793
-------------------
805794

806-
.. versionadded:: 0.15.2
795+
You can write data that contains ``category`` dtypes to a ``HDFStore``.
796+
See :ref:`here <io.hdf5-categorical>` for an example and caveats.
807797

808-
Writing data (`Series`, `Frames`) to a HDF store that contains a ``category`` dtype was implemented
809-
in 0.15.2. See :ref:`here <io.hdf5-categorical>` for an example and caveats.
810-
811-
Writing data to and reading data from *Stata* format files was implemented in
812-
0.15.2. See :ref:`here <io.stata-categorical>` for an example and caveats.
798+
It is also possible to write data to and reading data from *Stata* format files.
799+
See :ref:`here <io.stata-categorical>` for an example and caveats.
813800

814801
Writing to a CSV file will convert the data, effectively removing any information about the
815802
categorical (categories and ordering). So if you read back the CSV file you have to convert the
@@ -928,32 +915,6 @@ an ``object`` dtype is a constant times the length of the data.
928915
s.astype('category').nbytes
929916
930917
931-
Old style constructor usage
932-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
933-
934-
In earlier versions than pandas 0.15, a `Categorical` could be constructed by passing in precomputed
935-
`codes` (called then `labels`) instead of values with categories. The `codes` were interpreted as
936-
pointers to the categories with `-1` as `NaN`. This type of constructor usage is replaced by
937-
the special constructor :func:`Categorical.from_codes`.
938-
939-
Unfortunately, in some special cases, using code which assumes the old style constructor usage
940-
will work with the current pandas version, resulting in subtle bugs:
941-
942-
.. code-block:: python
943-
944-
>>> cat = pd.Categorical([1,2], [1,2,3])
945-
>>> # old version
946-
>>> cat.get_values()
947-
array([2, 3], dtype=int64)
948-
>>> # new version
949-
>>> cat.get_values()
950-
array([1, 2], dtype=int64)
951-
952-
.. warning::
953-
If you used `Categoricals` with older versions of pandas, please audit your code before
954-
upgrading and change your code to use the :func:`~pandas.Categorical.from_codes`
955-
constructor.
956-
957918
`Categorical` is not a `numpy` array
958919
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
959920

@@ -982,8 +943,7 @@ Dtype comparisons work:
982943
dtype == np.str_
983944
np.str_ == dtype
984945
985-
To check if a Series contains Categorical data, with pandas 0.16 or later, use
986-
``hasattr(s, 'cat')``:
946+
To check if a Series contains Categorical data, use ``hasattr(s, 'cat')``:
987947

988948
.. ipython:: python
989949
@@ -1023,13 +983,13 @@ basic type) and applying along columns will also convert to object.
1023983
Categorical Index
1024984
~~~~~~~~~~~~~~~~~
1025985

1026-
.. versionadded:: 0.16.1
1027-
1028-
A new ``CategoricalIndex`` index type is introduced in version 0.16.1. See the
1029-
:ref:`advanced indexing docs <indexing.categoricalindex>` for a more detailed
986+
``CategoricalIndex`` is a type of index that is useful for supporting
987+
indexing with duplicates. This is a container around a ``Categorical``
988+
and allows efficient indexing and storage of an index with a large number of duplicated elements.
989+
See the :ref:`advanced indexing docs <indexing.categoricalindex>` for a more detailed
1030990
explanation.
1031991

1032-
Setting the index, will create create a ``CategoricalIndex``
992+
Setting the index will create a ``CategoricalIndex``
1033993

1034994
.. ipython:: python
1035995
@@ -1041,10 +1001,6 @@ Setting the index, will create create a ``CategoricalIndex``
10411001
# This now sorts by the categories order
10421002
df.sort_index()
10431003
1044-
In previous versions (<0.16.1) there is no index of type ``category``, so
1045-
setting the index to categorical column will convert the categorical data to a
1046-
"normal" dtype first and therefore remove any custom ordering of the categories.
1047-
10481004
Side Effects
10491005
~~~~~~~~~~~~
10501006

doc/source/comparison_with_r.rst

-2
Original file line numberDiff line numberDiff line change
@@ -505,8 +505,6 @@ For more details and examples see :ref:`the reshaping documentation
505505
|factor|_
506506
~~~~~~~~~
507507

508-
.. versionadded:: 0.15
509-
510508
pandas has a data type for categorical data.
511509

512510
.. code-block:: r

doc/source/computation.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -924,15 +924,12 @@ EWM has a ``min_periods`` argument, which has the same
924924
meaning it does for all the ``.expanding`` and ``.rolling`` methods:
925925
no output values will be set until at least ``min_periods`` non-null values
926926
are encountered in the (expanding) window.
927-
(This is a change from versions prior to 0.15.0, in which the ``min_periods``
928-
argument affected only the ``min_periods`` consecutive entries starting at the
929-
first non-null value.)
930927

931-
EWM also has an ``ignore_na`` argument, which deterines how
928+
EWM also has an ``ignore_na`` argument, which determines how
932929
intermediate null values affect the calculation of the weights.
933930
When ``ignore_na=False`` (the default), weights are calculated based on absolute
934931
positions, so that intermediate null values affect the result.
935-
When ``ignore_na=True`` (which reproduces the behavior in versions prior to 0.15.0),
932+
When ``ignore_na=True``,
936933
weights are calculated by ignoring intermediate null values.
937934
For example, assuming ``adjust=True``, if ``ignore_na=False``, the weighted
938935
average of ``3, NaN, 5`` would be calculated as

doc/source/cookbook.rst

-6
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,6 @@ Panels
256256
257257
pf = pd.Panel({'df1':df1,'df2':df2,'df3':df3});pf
258258
259-
#Assignment using Transpose (pandas < 0.15)
260-
pf = pf.transpose(2,0,1)
261-
pf['E'] = pd.DataFrame(data, rng, cols)
262-
pf = pf.transpose(1,2,0);pf
263-
264-
#Direct assignment (pandas > 0.15)
265259
pf.loc[:,:,'F'] = pd.DataFrame(data, rng, cols);pf
266260
267261
`Mask a panel by using np.where and then reconstructing the panel with the new masked values

doc/source/dsintro.rst

-2
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,6 @@ available to insert at a particular location in the columns:
453453
Assigning New Columns in Method Chains
454454
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
455455

456-
.. versionadded:: 0.16.0
457-
458456
Inspired by `dplyr's
459457
<http://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html#mutate>`__
460458
``mutate`` verb, DataFrame has an :meth:`~pandas.DataFrame.assign`

doc/source/gotchas.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Frequently Asked Questions (FAQ)
2222

2323
DataFrame memory usage
2424
----------------------
25-
As of pandas version 0.15.0, the memory usage of a dataframe (including
26-
the index) is shown when accessing the ``info`` method of a dataframe. A
25+
The memory usage of a dataframe (including the index)
26+
is shown when accessing the ``info`` method of a dataframe. A
2727
configuration option, ``display.memory_usage`` (see :ref:`options`),
2828
specifies if the dataframe's memory usage will be displayed when
2929
invoking the ``df.info()`` method.

doc/source/indexing.rst

-14
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ advanced indexing.
4747
should be avoided. See :ref:`Returning a View versus Copy
4848
<indexing.view_versus_copy>`
4949

50-
.. warning::
51-
52-
In 0.15.0 ``Index`` has internally been refactored to no longer subclass ``ndarray``
53-
but instead subclass ``PandasObject``, similarly to the rest of the pandas objects. This should be
54-
a transparent change with only very limited API implications (See the :ref:`Internal Refactoring <whatsnew_0150.refactoring>`)
55-
5650
.. warning::
5751

5852
Indexing on an integer-based Index with floats has been clarified in 0.18.0, for a summary of the changes, see :ref:`here <whatsnew_0180.float_indexers>`.
@@ -660,7 +654,6 @@ For getting *multiple* indexers, using ``.get_indexer``
660654

661655
Selecting Random Samples
662656
------------------------
663-
.. versionadded::0.16.1
664657

665658
A random selection of rows or columns from a Series, DataFrame, or Panel with the :meth:`~DataFrame.sample` method. The method will sample rows by default, and accepts a specific number of rows/columns to return, or a fraction of rows.
666659

@@ -1510,8 +1503,6 @@ See :ref:`Advanced Indexing <advanced>` for usage of MultiIndexes.
15101503
ind.name = "bob"
15111504
ind
15121505
1513-
.. versionadded:: 0.15.0
1514-
15151506
``set_names``, ``set_levels``, and ``set_labels`` also take an optional
15161507
`level`` argument
15171508

@@ -1527,11 +1518,6 @@ Set operations on Index objects
15271518

15281519
.. _indexing.set_ops:
15291520

1530-
.. warning::
1531-
1532-
In 0.15.0. the set operations ``+`` and ``-`` were deprecated in order to provide these for numeric type operations on certain
1533-
index types. ``+`` can be replace by ``.union()`` or ``|``, and ``-`` by ``.difference()``.
1534-
15351521
The two main operations are ``union (|)``, ``intersection (&)``
15361522
These can be directly called as instance methods or used via overloaded
15371523
operators. Difference is provided via the ``.difference()`` method.

doc/source/install.rst

+8-12
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Instructions for installing from source,
1818
Python version support
1919
----------------------
2020

21-
Officially Python 2.7, 3.4, 3.5, and 3.6
21+
Officially Python 2.7, 3.5, and 3.6.
2222

2323
Installing pandas
2424
-----------------
@@ -183,21 +183,17 @@ installed), make sure you have `pytest
183183

184184
>>> import pandas as pd
185185
>>> pd.test()
186-
Running unit tests for pandas
187-
pandas version 0.18.0
188-
numpy version 1.10.2
189-
pandas is installed in pandas
190-
Python version 2.7.11 |Continuum Analytics, Inc.|
191-
(default, Dec 6 2015, 18:57:58) [GCC 4.2.1 (Apple Inc. build 5577)]
192-
nose version 1.3.7
186+
running: pytest --skip-slow --skip-network C:\Users\TP\Anaconda3\envs\py36\lib\site-packages\pandas
187+
============================= test session starts =============================
188+
platform win32 -- Python 3.6.2, pytest-3.2.1, py-1.4.34, pluggy-0.4.0
189+
rootdir: C:\Users\TP\Documents\Python\pandasdev\pandas, inifile: setup.cfg
190+
collected 12145 items / 3 skipped
191+
193192
..................................................................S......
194193
........S................................................................
195194
.........................................................................
196195

197-
----------------------------------------------------------------------
198-
Ran 9252 tests in 368.339s
199-
200-
OK (SKIP=117)
196+
==================== 12130 passed, 12 skipped in 368.339 seconds =====================
201197

202198
Dependencies
203199
------------

0 commit comments

Comments
 (0)