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
+52-55
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Highlights include:
12
12
- Building pandas for development now requires ``cython >= 0.23`` (:issue:`14831`)
13
13
- The ``.ix`` indexer has been deprecated, see :ref:`here <whatsnew_0200.api_breaking.deprecate_ix>`
14
14
- Switched the test framework to `pytest`_ (:issue:`13097`)
15
-
- A new orient for JSON serialization, ``orient='table'``, that uses the Table Schema spec, see :ref:`here <whatsnew_0200.enhancements.table_schema>`
15
+
- A new orient for JSON serialization, ``orient='table'``, that uses the Table Schema spec, see :ref:`here <whatsnew_0200.enhancements.table_schema>`
16
16
17
17
.. _pytest: http://doc.pytest.org/en/latest/
18
18
@@ -27,11 +27,6 @@ Check the :ref:`API Changes <whatsnew_0200.api_breaking>` and :ref:`deprecations
27
27
New features
28
28
~~~~~~~~~~~~
29
29
30
-
- Integration with the ``feather-format``, including a new top-level ``pd.read_feather()`` and ``DataFrame.to_feather()`` method, see :ref:`here <io.feather>`.
31
-
- ``Series.str.replace()`` now accepts a callable, as replacement, which is passed to ``re.sub`` (:issue:`15055`)
32
-
- ``Series.str.replace()`` now accepts a compiled regular expression as a pattern (:issue:`15446`)
33
-
34
-
35
30
36
31
.. _whatsnew_0200.enhancements.dataio_dtype:
37
32
@@ -193,6 +188,11 @@ You must enable this by setting the ``display.html.table_schema`` option to True
193
188
194
189
Other enhancements
195
190
^^^^^^^^^^^^^^^^^^
191
+
- Integration with the ``feather-format``, including a new top-level ``pd.read_feather()`` and ``DataFrame.to_feather()`` method, see :ref:`here <io.feather>`.
192
+
- ``Series.str.replace()`` now accepts a callable, as replacement, which is passed to ``re.sub`` (:issue:`15055`)
193
+
- ``Series.str.replace()`` now accepts a compiled regular expression as a pattern (:issue:`15446`)
194
+
195
+
196
196
- ``Series.sort_index`` accepts parameters ``kind`` and ``na_position`` (:issue:`13589`, :issue:`14444`)
197
197
198
198
- ``DataFrame`` has gained a ``nunique()`` method to count the distinct values over an axis (:issue:`14336`).
@@ -201,7 +201,6 @@ Other enhancements
201
201
- ``pd.read_excel`` now preserves sheet order when using ``sheetname=None`` (:issue:`9930`)
202
202
- Multiple offset aliases with decimal points are now supported (e.g. '0.5min' is parsed as '30s') (:issue:`8419`)
203
203
- ``.isnull()`` and ``.notnull()`` have been added to ``Index`` object to make them more consistent with the ``Series`` API (:issue:`15300`)
204
-
- ``pd.read_gbq`` method now allows query configuration preferences (:issue:`14742`)
205
204
206
205
- New ``UnsortedIndexError`` (subclass of ``KeyError``) raised when indexing/slicing into an
207
206
unsorted MultiIndex (:issue:`11897`). This allows differentiation between errors due to lack
@@ -290,7 +289,7 @@ Possible incompat for HDF5 formats for pandas < 0.13.0
``pd.TimeSeries`` was deprecated officially in 0.17.0, though has only been an alias since 0.13.0. It has
293
-
been dropped in favor of ``pd.Series``. (:issue:``15098).
292
+
been dropped in favor of ``pd.Series``. (:issue:`15098`).
294
293
295
294
This *may* cause HDF5 files that were created in prior versions to become unreadable if ``pd.TimeSeries``
296
295
was used. This is most likely to be for pandas < 0.13.0. If you find yourself in this situation.
@@ -329,68 +328,66 @@ then write them out again after applying the procedure below.
329
328
Map on Index types now return other Index types
330
329
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
331
330
332
-
- ``map`` on an ``Index`` now returns an ``Index``, not a numpy array (:issue:`12766`)
333
-
334
-
.. ipython:: python
335
-
336
-
idx = Index([1, 2])
337
-
idx
338
-
mi = MultiIndex.from_tuples([(1, 2), (2, 4)])
339
-
mi
331
+
``map`` on an ``Index`` now returns an ``Index``, not a numpy array (:issue:`12766`)
340
332
341
-
Previous Behavior:
333
+
.. ipython:: python
342
334
343
-
.. code-block:: ipython
335
+
idx = Index([1, 2])
336
+
idx
337
+
mi = MultiIndex.from_tuples([(1, 2), (2, 4)])
338
+
mi
344
339
345
-
In [5]: idx.map(lambda x: x * 2)
346
-
Out[5]: array([2, 4])
340
+
Previous Behavior:
347
341
348
-
In [6]: idx.map(lambda x: (x, x * 2))
349
-
Out[6]: array([(1, 2), (2, 4)], dtype=object)
342
+
.. code-block:: ipython
350
343
351
-
In [7]: mi.map(lambda x: x)
352
-
Out[7]: array([(1, 2), (2, 4)], dtype=object)
344
+
In [5]: idx.map(lambda x: x * 2)
345
+
Out[5]: array([2, 4])
353
346
354
-
In [8]: mi.map(lambda x: x[0])
355
-
Out[8]: array([1, 2])
347
+
In [6]: idx.map(lambda x: (x, x * 2))
348
+
Out[6]: array([(1, 2), (2, 4)], dtype=object)
356
349
357
-
New Behavior:
350
+
In [7]: mi.map(lambda x: x)
351
+
Out[7]: array([(1, 2), (2, 4)], dtype=object)
358
352
359
-
.. ipython:: python
353
+
In [8]: mi.map(lambda x: x[0])
354
+
Out[8]: array([1, 2])
360
355
361
-
idx.map(lambda x: x * 2)
356
+
New Behavior:
362
357
363
-
idx.map(lambda x: (x, x * 2))
358
+
.. ipython:: python
364
359
365
-
mi.map(lambda x: x)
360
+
idx.map(lambda x: x * 2)
361
+
idx.map(lambda x: (x, x * 2))
366
362
367
-
mi.map(lambda x: x[0])
363
+
mi.map(lambda x: x)
368
364
365
+
mi.map(lambda x: x[0])
369
366
370
-
- ``map`` on a ``Series`` with ``datetime64`` values may return ``int64`` dtypes rather than ``int32``
371
367
372
-
.. ipython:: python
368
+
``map`` on a ``Series`` with ``datetime64`` values may return ``int64`` dtypes rather than ``int32``
373
369
374
-
s = Series(date_range('2011-01-02T00:00', '2011-01-02T02:00', freq='H').tz_localize('Asia/Tokyo'))
375
-
s
370
+
.. ipython:: python
376
371
377
-
Previous Behavior:
372
+
s = Series(date_range('2011-01-02T00:00', '2011-01-02T02:00', freq='H').tz_localize('Asia/Tokyo'))
373
+
s
378
374
379
-
.. code-block:: ipython
375
+
Previous Behavior:
380
376
381
-
In [9]: s.map(lambda x: x.hour)
382
-
Out[9]:
383
-
0 0
384
-
1 1
385
-
2 2
386
-
dtype: int32
377
+
.. code-block:: ipython
387
378
379
+
In [9]: s.map(lambda x: x.hour)
380
+
Out[9]:
381
+
0 0
382
+
1 1
383
+
2 2
384
+
dtype: int32
388
385
389
-
New Behavior:
386
+
New Behavior:
390
387
391
-
.. ipython:: python
388
+
.. ipython:: python
392
389
393
-
s.map(lambda x: x.hour)
390
+
s.map(lambda x: x.hour)
394
391
395
392
.. _whatsnew_0200.api_breaking.s3:
396
393
@@ -444,8 +441,8 @@ Pandas Google BigQuery support has moved
444
441
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
445
442
446
443
pandas has split off Google BigQuery support into a separate package ``pandas-gbq``. You can ``pip install pandas-gbq`` to get it.
447
-
The functionality of ``pd.read_gbq()`` and ``.to_gbq()`` remains the same with the currently released version of ``pandas-gbq=0.1.2``. (:issue:`15347`)
448
-
Documentation is now hosted `here <https://pandas-gbq.readthedocs.io/>`__
444
+
The functionality of :func:`read_gbq` and :meth:`DataFrame.to_gbq` remain the same with the currently released version of ``pandas-gbq=0.1.3``.
445
+
Documentation is now hosted `here <https://pandas-gbq.readthedocs.io/>`__ (:issue:`15347`)
449
446
450
447
.. _whatsnew_0200.api_breaking.memory_usage:
451
448
@@ -611,9 +608,9 @@ Other API Changes
611
608
- ``inplace`` arguments now require a boolean value, else a ``ValueError`` is thrown (:issue:`14189`)
612
609
- ``pandas.api.types.is_datetime64_ns_dtype`` will now report ``True`` on a tz-aware dtype, similar to ``pandas.api.types.is_datetime64_any_dtype``
613
610
- ``DataFrame.asof()`` will return a null filled ``Series`` instead the scalar ``NaN`` if a match is not found (:issue:`15118`)
614
-
- The :func:`pd.read_gbq` method now stores ``INTEGER`` columns as ``dtype=object`` if they contain ``NULL`` values. Otherwise they are stored as ``int64``. This prevents precision lost for integers greather than 2**53. Furthermore ``FLOAT`` columns with values above 10**4 are no longer casted to ``int64`` which also caused precision loss (:issue:`14064`, :issue:`14305`).
615
611
- Reorganization of timeseries development tests (:issue:`14854`)
616
612
- Specific support for ``copy.copy()`` and ``copy.deepcopy()`` functions on NDFrame objects (:issue:`15444`)
613
+
- ``Series.sort_values()`` accepts a one element list of bool for consistency with the behavior of ``DataFrame.sort_values()`` (:issue:`15604`)
617
614
618
615
.. _whatsnew_0200.deprecations:
619
616
@@ -651,7 +648,7 @@ Removal of prior version deprecations/changes
651
648
- ``pandas.stats.fama_macbeth``, ``pandas.stats.ols``, ``pandas.stats.plm`` and ``pandas.stats.var``, as well as the top-level ``pandas.fama_macbeth`` and ``pandas.ols`` routines are removed. Similar functionaility can be found in the `statsmodels <shttp://www.statsmodels.org/dev/>`__ package. (:issue:`11898`)
652
649
- The ``TimeSeries`` and ``SparseTimeSeries`` classes, aliases of ``Series``
653
650
and ``SparseSeries``, are removed (:issue:`10890`, :issue:`15098`).
654
-
- ``Series.is_time_series`` is dropped in favor of ``Series.index.is_all_dates`` (:issue:``)
651
+
- ``Series.is_time_series`` is dropped in favor of ``Series.index.is_all_dates`` (:issue:`15098`)
655
652
- The deprecated ``irow``, ``icol``, ``iget`` and ``iget_value`` methods are removed
656
653
in favor of ``iloc`` and ``iat`` as explained :ref:`here <whatsnew_0170.deprecations>` (:issue:`10711`).
657
654
@@ -668,7 +665,7 @@ Performance Improvements
668
665
- Improved performance of ``groupby().cummin()`` and ``groupby().cummax()`` (:issue:`15048`, :issue:`15109`, :issue:`15561`)
669
666
- Improved performance and reduced memory when indexing with a ``MultiIndex`` (:issue:`15245`)
670
667
- When reading buffer object in ``read_sas()`` method without specified format, filepath string is inferred rather than buffer object. (:issue:`14947`)
671
-
- Improved performance of `rank()` for categorical data (:issue:`15498`)
668
+
- Improved performance of ``.rank()`` for categorical data (:issue:`15498`)
672
669
- Improved performance when using ``.unstack()`` (:issue:`15503`)
673
670
674
671
@@ -681,7 +678,7 @@ Bug Fixes
681
678
- Bug in ``Index`` power operations with reversed operands (:issue:`14973`)
682
679
- Bug in ``TimedeltaIndex`` addition where overflow was being allowed without error (:issue:`14816`)
683
680
- Bug in ``TimedeltaIndex`` raising a ``ValueError`` when boolean indexing with ``loc`` (:issue:`14946`)
684
-
- Bug in ``DatetimeIndex.round()`` and ``Timestamp.round()`` floating point accuracy when rounding by milliseconds or less (:issue:`14440`, :issue:`15578`)
681
+
- Bug in ``DatetimeIndex.round()`` and ``Timestamp.round()`` floating point accuracy when rounding by milliseconds or less (:issue:`14440`, :issue:`15578`)
685
682
- Bug in ``astype()`` where ``inf`` values were incorrectly converted to integers. Now raises error now with ``astype()`` for Series and DataFrames (:issue:`14265`)
686
683
- Bug in ``DataFrame(..).apply(to_numeric)`` when values are of type decimal.Decimal. (:issue:`14827`)
687
684
- Bug in ``describe()`` when passing a numpy array which does not contain the median to the ``percentiles`` keyword argument (:issue:`14908`)
@@ -699,8 +696,8 @@ Bug Fixes
699
696
- Bug in ``DataFrame.loc`` with indexing a ``MultiIndex`` with a ``Series`` indexer (:issue:`14730`, :issue:`15424`)
700
697
- Bug in ``DataFrame.loc`` with indexing a ``MultiIndex`` with a numpy array (:issue:`15434`)
701
698
- Bug in ``Rolling.quantile`` function that caused a segmentation fault when called with a quantile value outside of the range [0, 1] (:issue:`15463`)
702
-
703
-
699
+
- Bug in ``pd.cut()`` with a single bin on an all 0s array (:issue:`15428`)
700
+
- Bug in ``pd.qcut()`` with a single quantile and an array with identical values (:issue:`15431`)
704
701
- Bug in ``SparseSeries.reindex`` on single level with list of length 1 (:issue:`15447`)
0 commit comments