You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.20.0.txt
+48-66
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,13 @@ Highlights include:
14
14
- The ``.ix`` indexer has been deprecated, see :ref:`here <whatsnew_0200.api_breaking.deprecate_ix>`
15
15
- ``Panel`` has been deprecated, see :ref:`here <whatsnew_0200.api_breaking.deprecate_panel>`
16
16
- Addition of an ``IntervalIndex`` and ``Interval`` scalar type, see :ref:`here <whatsnew_0200.enhancements.intervalindex>`
17
-
- Improved user API when accessing levels in ``.groupby()``, see :ref:`here <whatsnew_0200.enhancements.groupby_access>`
17
+
- Improved user API when grouping by index levels in ``.groupby()``, see :ref:`here <whatsnew_0200.enhancements.groupby_access>`
18
18
- Improved support for ``UInt64`` dtypes, see :ref:`here <whatsnew_0200.enhancements.uint64_support>`
19
-
- A new orient for JSON serialization, ``orient='table'``, that uses the :ref:`Table Schema spec <whatsnew_0200.enhancements.table_schema>`
20
-
- Experimental support for exporting ``DataFrame.style`` formats to Excel, see :ref:`here <whatsnew_0200.enhancements.style_excel>`
19
+
- A new orient for JSON serialization, ``orient='table'``, that uses the Table Schema spec and that gives the possibility for a more interactive repr in the Jupyter Notebook, see :ref:`here <whatsnew_0200.enhancements.table_schema>`
20
+
- Experimental support for exporting styled DataFrames (``DataFrame.style``) to Excel, see :ref:`here <whatsnew_0200.enhancements.style_excel>`
21
21
- Window binary corr/cov operations now return a MultiIndexed ``DataFrame`` rather than a ``Panel``, as ``Panel`` is now deprecated, see :ref:`here <whatsnew_0200.api_breaking.rolling_pairwise>`
22
22
- Support for S3 handling now uses ``s3fs``, see :ref:`here <whatsnew_0200.api_breaking.s3>`
23
23
- Google BigQuery support now uses the ``pandas-gbq`` library, see :ref:`here <whatsnew_0200.api_breaking.gbq>`
24
-
- Switched the test framework to use `pytest <http://doc.pytest.org/en/latest>`__ (:issue:`13097`)
25
24
26
25
.. warning::
27
26
@@ -46,12 +45,12 @@ New features
46
45
47
46
.. _whatsnew_0200.enhancements.agg:
48
47
49
-
``agg`` API
50
-
^^^^^^^^^^^
48
+
``agg`` API for DataFrame/Series
49
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
51
50
52
51
Series & DataFrame have been enhanced to support the aggregation API. This is a familiar API
53
-
from groupby, window operations, and resampling. This allows aggregation operations in a concise
54
-
by using :meth:`~DataFrame.agg`, and :meth:`~DataFrame.transform`. The full documentation
52
+
from groupby, window operations, and resampling. This allows aggregation operations in a concise way
53
+
by using :meth:`~DataFrame.agg` and :meth:`~DataFrame.transform`. The full documentation
55
54
is :ref:`here <basics.aggregate>` (:issue:`1623`).
56
55
57
56
Here is a sample
@@ -112,22 +111,14 @@ aggregations. This is similiar to how groupby ``.agg()`` works. (:issue:`15015`)
112
111
``dtype`` keyword for data IO
113
112
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
114
113
115
-
The ``'python'`` engine for :func:`read_csv` now accepts the ``dtype`` keyword argument for specifying the types of specific columns (:issue:`14295`). See the :ref:`io docs <io.dtypes>` for more information.
114
+
The ``'python'`` engine for :func:`read_csv`, as well as the :func:`read_fwf` function for parsing
115
+
fixed-width text files and :func:`read_excel` for parsing Excel files, now accept the ``dtype`` keyword argument for specifying the types of specific columns (:issue:`14295`). See the :ref:`io docs <io.dtypes>` for more information.
The default is set at ``origin='unix'``, which defaults to ``1970-01-01 00:00:00``.
152
-
Commonly called 'unix epoch' or POSIX time. This was the previous default, so this is a backward compatible change.
142
+
The default is set at ``origin='unix'``, which defaults to ``1970-01-01 00:00:00``, which is
143
+
commonly called 'unix epoch' or POSIX time. This was the previous default, so this is a backward compatible change.
153
144
154
145
.. ipython:: python
155
146
@@ -161,7 +152,7 @@ Commonly called 'unix epoch' or POSIX time. This was the previous default, so th
161
152
Groupby Enhancements
162
153
^^^^^^^^^^^^^^^^^^^^
163
154
164
-
Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now reference either column names or index level names.
155
+
Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now reference either column names or index level names. Previously, only column names could be referenced. This allows to easily group by a column and index level at the same time. (:issue:`5677`)
165
156
166
157
.. ipython:: python
167
158
@@ -177,8 +168,6 @@ Strings passed to ``DataFrame.groupby()`` as the ``by`` parameter may now refere
177
168
178
169
df.groupby(['second', 'A']).sum()
179
170
180
-
Previously, only column names could be referenced. (:issue:`5677`)
181
-
182
171
183
172
.. _whatsnew_0200.enhancements.compressed_urls:
184
173
@@ -208,7 +197,7 @@ support for bz2 compression in the python 2 C-engine improved (:issue:`14874`).
208
197
Pickle file I/O now supports compression
209
198
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
210
199
211
-
:func:`read_pickle`, :meth:`DataFame.to_pickle` and :meth:`Series.to_pickle`
200
+
:func:`read_pickle`, :meth:`DataFrame.to_pickle` and :meth:`Series.to_pickle`
212
201
can now read from and write to compressed pickle files. Compression methods
213
202
can be an explicit parameter or be inferred from the file extension.
214
203
See :ref:`the docs here. <io.pickle.compression>`
@@ -226,33 +215,24 @@ Using an explicit compression type
These indexing behaviors of the IntervalIndex are provisional and may change in a future version of pandas. Feedback on usage is welcome.
401
+
402
+
418
403
Previous behavior:
419
404
420
405
The returned categories were strings, representing Intervals
@@ -477,9 +462,8 @@ Other Enhancements
477
462
- ``Series.str.replace()`` now accepts a callable, as replacement, which is passed to ``re.sub`` (:issue:`15055`)
478
463
- ``Series.str.replace()`` now accepts a compiled regular expression as a pattern (:issue:`15446`)
479
464
- ``Series.sort_index`` accepts parameters ``kind`` and ``na_position`` (:issue:`13589`, :issue:`14444`)
480
-
- ``DataFrame`` has gained a ``nunique()`` method to count the distinct values over an axis (:issue:`14336`).
465
+
- ``DataFrame`` and ``DataFrame.groupby()`` have gained a ``nunique()`` method to count the distinct values over an axis (:issue:`14336`, :issue:`15197`).
481
466
- ``DataFrame`` has gained a ``melt()`` method, equivalent to ``pd.melt()``, for unpivoting from a wide to long format (:issue:`12640`).
482
-
- ``DataFrame.groupby()`` has gained a ``.nunique()`` method to count the distinct values for all columns within each group (:issue:`14336`, :issue:`15197`).
483
467
- ``pd.read_excel()`` now preserves sheet order when using ``sheetname=None`` (:issue:`9930`)
484
468
- Multiple offset aliases with decimal points are now supported (e.g. ``0.5min`` is parsed as ``30s``) (:issue:`8419`)
485
469
- ``.isnull()`` and ``.notnull()`` have been added to ``Index`` object to make them more consistent with the ``Series`` API (:issue:`15300`)
@@ -510,9 +494,8 @@ Other Enhancements
510
494
- ``DataFrame.to_excel()`` has a new ``freeze_panes`` parameter to turn on Freeze Panes when exporting to Excel (:issue:`15160`)
511
495
- ``pd.read_html()`` will parse multiple header rows, creating a MutliIndex header. (:issue:`13434`).
512
496
- HTML table output skips ``colspan`` or ``rowspan`` attribute if equal to 1. (:issue:`15403`)
513
-
- :class:`pandas.io.formats.style.Styler`` template now has blocks for easier extension, :ref:`see the example notebook <style.ipynb#Subclassing>` (:issue:`15649`)
514
-
- :meth:`pandas.io.formats.style.Styler.render` now accepts ``**kwargs`` to allow user-defined variables in the template (:issue:`15649`)
515
-
- ``pd.io.api.Styler.render`` now accepts ``**kwargs`` to allow user-defined variables in the template (:issue:`15649`)
497
+
- :class:`pandas.io.formats.style.Styler` template now has blocks for easier extension, :ref:`see the example notebook <style.ipynb#Subclassing>` (:issue:`15649`)
498
+
- :meth:`Styler.render() <pandas.io.formats.style.Styler.render>` now accepts ``**kwargs`` to allow user-defined variables in the template (:issue:`15649`)
516
499
- Compatibility with Jupyter notebook 5.0; MultiIndex column labels are left-aligned and MultiIndex row-labels are top-aligned (:issue:`15379`)
517
500
- ``TimedeltaIndex`` now has a custom date-tick formatter specifically designed for nanosecond level precision (:issue:`8711`)
518
501
- ``pd.api.types.union_categoricals`` gained the ``ignore_ordered`` argument to allow ignoring the ordered attribute of unioned categoricals (:issue:`13410`). See the :ref:`categorical union docs <categorical.union>` for more information.
@@ -523,7 +506,7 @@ Other Enhancements
523
506
- ``pandas.io.json.json_normalize()`` gained the option ``errors='ignore'|'raise'``; the default is ``errors='raise'`` which is backward compatible. (:issue:`14583`)
524
507
- ``pandas.io.json.json_normalize()`` with an empty ``list`` will return an empty ``DataFrame`` (:issue:`15534`)
525
508
- ``pandas.io.json.json_normalize()`` has gained a ``sep`` option that accepts ``str`` to separate joined fields; the default is ".", which is backward compatible. (:issue:`14883`)
526
-
- :meth:`~MultiIndex.remove_unused_levels` has been added to facilitate :ref:`removing unused levels <advanced.shown_levels>`. (:issue:`15694`)
509
+
- :meth:`MultiIndex.remove_unused_levels` has been added to facilitate :ref:`removing unused levels <advanced.shown_levels>`. (:issue:`15694`)
527
510
- ``pd.read_csv()`` will now raise a ``ParserError`` error whenever any parsing error occurs (:issue:`15913`, :issue:`15925`)
528
511
- ``pd.read_csv()`` now supports the ``error_bad_lines`` and ``warn_bad_lines`` arguments for the Python parser (:issue:`15925`)
529
512
- The ``display.show_dimensions`` option can now also be used to specify
@@ -546,7 +529,7 @@ Backwards incompatible API changes
546
529
Possible incompatibility for HDF5 formats created with pandas < 0.13.0
@@ -1016,7 +997,7 @@ See the section on :ref:`Windowed Binary Operations <stats.moments.binary>` for
1016
997
periods=100, freq='D', name='foo'))
1017
998
df.tail()
1018
999
1019
-
Old Behavior:
1000
+
Previous Behavior:
1020
1001
1021
1002
.. code-block:: ipython
1022
1003
@@ -1232,12 +1213,12 @@ If indicated, a deprecation warning will be issued if you reference theses modul
1232
1213
"pandas.algos", "pandas._libs.algos", ""
1233
1214
"pandas.hashtable", "pandas._libs.hashtable", ""
1234
1215
"pandas.indexes", "pandas.core.indexes", ""
1235
-
"pandas.json", "pandas._libs.json", "X"
1216
+
"pandas.json", "pandas._libs.json / pandas.io.json", "X"
1236
1217
"pandas.parser", "pandas._libs.parsers", "X"
1237
1218
"pandas.formats", "pandas.io.formats", ""
1238
1219
"pandas.sparse", "pandas.core.sparse", ""
1239
-
"pandas.tools", "pandas.core.reshape", ""
1240
-
"pandas.types", "pandas.core.dtypes", ""
1220
+
"pandas.tools", "pandas.core.reshape", "X"
1221
+
"pandas.types", "pandas.core.dtypes", "X"
1241
1222
"pandas.io.sas.saslib", "pandas.io.sas._sas", ""
1242
1223
"pandas._join", "pandas._libs.join", ""
1243
1224
"pandas._hash", "pandas._libs.hashing", ""
@@ -1253,11 +1234,12 @@ exposed in the top-level namespace: ``pandas.errors``, ``pandas.plotting`` and
1253
1234
certain functions in the ``pandas.io`` and ``pandas.tseries`` submodules,
1254
1235
these are now the public subpackages.
1255
1236
1237
+
Further changes:
1256
1238
1257
1239
- The function :func:`~pandas.api.types.union_categoricals` is now importable from ``pandas.api.types``, formerly from ``pandas.types.concat`` (:issue:`15998`)
1258
1240
- The type import ``pandas.tslib.NaTType`` is deprecated and can be replaced by using ``type(pandas.NaT)`` (:issue:`16146`)
1259
1241
- The public functions in ``pandas.tools.hashing`` deprecated from that locations, but are now importable from ``pandas.util`` (:issue:`16223`)
1260
-
- The modules in ``pandas.util``: ``decorators``, ``print_versions``, ``doctools``, `validators``, ``depr_module`` are now private (:issue:`16223`)
1242
+
- The modules in ``pandas.util``: ``decorators``, ``print_versions``, ``doctools``, ``validators``, ``depr_module`` are now private. Only the functions exposed in ``pandas.util`` itself are public (:issue:`16223`)
1261
1243
1262
1244
.. _whatsnew_0200.privacy.errors:
1263
1245
@@ -1324,7 +1306,7 @@ Deprecations
1324
1306
Deprecate ``.ix``
1325
1307
^^^^^^^^^^^^^^^^^
1326
1308
1327
-
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*, depending on the data type of the index. This has caused quite a bit of user confusion over the years. The full indexing documentation are :ref:`here <indexing>`. (:issue:`14218`)
1309
+
The ``.ix`` indexer is deprecated, in favor of the more strict ``.iloc`` and ``.loc`` indexers. ``.ix`` offers a lot of magic on the inference of what the user wants to do. To wit, ``.ix`` can decide to index *positionally* OR via *labels*, depending on the data type of the index. This has caused quite a bit of user confusion over the years. The full indexing documentation is :ref:`here <indexing>`. (:issue:`14218`)
1328
1310
1329
1311
The recommended methods of indexing are:
1330
1312
@@ -1372,7 +1354,7 @@ Deprecate Panel
1372
1354
1373
1355
``Panel`` is deprecated and will be removed in a future version. The recommended way to represent 3-D data are
1374
1356
with a ``MultiIndex`` on a ``DataFrame`` via the :meth:`~Panel.to_frame` or with the `xarray package <http://xarray.pydata.org/en/stable/>`__. Pandas
1375
-
provides a :meth:`~Panel.to_xarray` method to automate this conversion. See the documentation :ref:`Deprecate Panel <dsintro.deprecate_panel>`. (:issue:`13563`).
1357
+
provides a :meth:`~Panel.to_xarray` method to automate this conversion. For more details see :ref:`Deprecate Panel <dsintro.deprecate_panel>` documentation. (:issue:`13563`).
1376
1358
1377
1359
.. ipython:: python
1378
1360
:okwarning:
@@ -1420,7 +1402,7 @@ This is an illustrative example:
1420
1402
1421
1403
Here is a typical useful syntax for computing different aggregations for different columns. This
1422
1404
is a natural, and useful syntax. We aggregate from the dict-to-list by taking the specified
1423
-
columns and applying the list of functions. This returns a ``MultiIndex`` for the columns.
1405
+
columns and applying the list of functions. This returns a ``MultiIndex`` for the columns (this is *not* deprecated).
0 commit comments