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/options.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -484,7 +484,7 @@ By default, "Ambiguous" character's width, "¡" (inverted exclamation) in below
484
484
485
485
.. image:: _static/option_unicode03.png
486
486
487
-
Enabling ``display.unicode.ambiguous_as_wide`` lets pandas to regard these character's width as 2. Note that this option will be effective only when ``display.unicode.east_asian_width`` is enabled. Confirm starting position has been changed, but not aligned properly because the setting is mismatched with this environment.
487
+
Enabling ``display.unicode.ambiguous_as_wide`` lets pandas to figure these character's width as 2. Note that this option will be effective only when ``display.unicode.east_asian_width`` is enabled. Confirm starting position has been changed, but is not aligned properly because the setting is mismatched with this environment.
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.17.0.txt
+38-37Lines changed: 38 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,7 @@ Releasing the GIL
126
126
127
127
We are releasing the global-interpreter-lock (GIL) on some cython operations.
128
128
This will allow other threads to run simultaneously during computation, potentially allowing performance improvements
129
-
from multi-threading. Notably ``groupby``, ``nsmallest`` and some indexing operations benefit from this. (:issue:`8882`)
129
+
from multi-threading. Notably ``groupby``, ``nsmallest``, ``value_counts`` and some indexing operations benefit from this. (:issue:`8882`)
130
130
131
131
For example the groupby expression in the following code will have the GIL released during the factorization step, e.g. ``df.groupby('key')``
132
132
as well as the ``.sum()`` operation.
@@ -139,7 +139,7 @@ as well as the ``.sum()`` operation.
139
139
'data' : np.random.randn(N) })
140
140
df.groupby('key')['data'].sum()
141
141
142
-
Releasing of the GIL could benefit an application that uses threads for user interactions (e.g. QT_), or performaning multi-threaded computations. A nice example of a library that can handle these types of computation-in-parallel is the dask_ library.
142
+
Releasing of the GIL could benefit an application that uses threads for user interactions (e.g. QT_), or performing multi-threaded computations. A nice example of a library that can handle these types of computation-in-parallel is the dask_ library.
143
143
144
144
.. _dask: https://dask.readthedocs.org/en/latest/
145
145
.. _QT: https://wiki.python.org/moin/PyQt
@@ -216,9 +216,9 @@ total_seconds
216
216
Period Frequency Enhancement
217
217
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218
218
219
-
``Period``, ``PeriodIndex`` and ``period_range`` can now accept multiplied freq. Also, ``Period.freq`` and ``PeriodIndex.freq`` are now stored as ``DateOffset`` instance like ``DatetimeIndex``, not ``str`` (:issue:`7811`)
219
+
``Period``, ``PeriodIndex`` and ``period_range`` can now accept multiplied freq. Also, ``Period.freq`` and ``PeriodIndex.freq`` are now stored as a ``DateOffset`` instance like ``DatetimeIndex``, and not as ``str`` (:issue:`7811`)
220
220
221
-
Multiplied freq represents a span of corresponding length. Below example creates a period of 3 days. Addition and subtraction will shift the period by its span.
221
+
A multiplied freq represents a span of corresponding length. The example below creates a period of 3 days. Addition and subtraction will shift the period by its span.
222
222
223
223
.. ipython:: python
224
224
@@ -229,7 +229,7 @@ Multiplied freq represents a span of corresponding length. Below example creates
229
229
p.to_timestamp()
230
230
p.to_timestamp(how='E')
231
231
232
-
You can use multiplied freq in ``PeriodIndex`` and ``period_range``.
232
+
You can use the multiplied freq in ``PeriodIndex`` and ``period_range``.
233
233
234
234
.. ipython:: python
235
235
@@ -274,15 +274,15 @@ The support math functions are `sin`, `cos`, `exp`, `log`, `expm1`, `log1p`,
These functions map to the intrinsics for the NumExpr engine. For Python
278
-
engine, they are mapped to NumPy calls.
277
+
These functions map to the intrinsics for the ``NumExpr`` engine. For the Python
278
+
engine, they are mapped to ``NumPy`` calls.
279
279
280
280
Changes to Excel with ``MultiIndex``
281
281
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
282
282
283
283
In version 0.16.2 a ``DataFrame`` with ``MultiIndex`` columns could not be written to Excel via ``to_excel``.
284
284
That functionality has been added (:issue:`10564`), along with updating ``read_excel`` so that the data can
285
-
be read back with no loss of information by specifying which columns/rows make up the ``MultiIndex``
285
+
be read back with, no loss of information, by specifying which columns/rows make up the ``MultiIndex``
286
286
in the ``header`` and ``index_col`` parameters (:issue:`4679`)
287
287
288
288
See the :ref:`documentation <io.excel>` for more details.
@@ -307,8 +307,8 @@ See the :ref:`documentation <io.excel>` for more details.
307
307
import os
308
308
os.remove('test.xlsx')
309
309
310
-
Previously, it was necessary to specify the ``has_index_names`` argument in ``read_excel``
311
-
if the serialized data had index names. For version 0.17 the ouptput format of ``to_excel``
310
+
Previously, it was necessary to specify the ``has_index_names`` argument in ``read_excel``,
311
+
if the serialized data had index names. For version 0.17.0 the ouptput format of ``to_excel``
312
312
has been changed to make this keyword unnecessary - the change is shown below.
313
313
314
314
**Old**
@@ -328,24 +328,23 @@ has been changed to make this keyword unnecessary - the change is shown below.
328
328
329
329
Google BigQuery Enhancements
330
330
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
331
-
- Added ability to automatically create a table using the :func:`pandas.io.gbq.to_gbq` function if destination table does not exist. (:issue:`8325`).
332
-
- Added ability to automatically create a dataset using the :func:`pandas.io.gbq.to_gbq` function if destination dataset does not exist. (:issue:`11121`).
333
-
- Added ability to replace an existing table and schema when calling the :func:`pandas.io.gbq.to_gbq` function via the ``if_exists`` argument. See the :ref:`docs <io.bigquery>` for more details (:issue:`8325`).
331
+
- Added ability to automatically create a table/dataset using the :func:`pandas.io.gbq.to_gbq` function if the destination table/dataset does not exist. (:issue:`8325`, :issue:`11121`).
332
+
- Added ability to replace an existing table and schema when calling the :func:`pandas.io.gbq.to_gbq` function via the ``if_exists`` argument. See the :ref:`docs <io.bigquery_writer>` for more details (:issue:`8325`).
334
333
- ``InvalidColumnOrder`` and ``InvalidPageToken`` in the gbq module will raise ``ValueError`` instead of ``IOError``.
335
334
- The ``generate_bq_schema()`` function is now deprecated and will be removed in a future version (:issue:`11121`)
336
-
- Update the gbq module to support Python 3 (:issue:`11094`).
335
+
- The gbq module will now support Python 3 (:issue:`11094`).
337
336
338
337
.. _whatsnew_0170.east_asian_width:
339
338
340
-
Display Alignemnt with Unicode East Asian Width
339
+
Display Alignment with Unicode East Asian Width
341
340
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
342
341
343
342
.. warning::
344
343
345
-
Enabling this option will affect the performance for printing of DataFrame and Series (about 2 times slower).
344
+
Enabling this option will affect the performance for printing of ``DataFrame`` and ``Series`` (about 2 times slower).
346
345
Use only when it is actually required.
347
346
348
-
Some East Asian countries use Unicode characters its width is corresponding to 2 alphabets. If DataFrame or Series contains these characters, default output cannot be aligned properly. The following options are added to enable precise handling for these characters.
347
+
Some East Asian countries use Unicode characters its width is corresponding to 2 alphabets. If a ``DataFrame`` or ``Series`` contains these characters, the default output cannot be aligned properly. The following options are added to enable precise handling for these characters.
349
348
350
349
- ``display.unicode.east_asian_width``: Whether to use the Unicode East Asian Width to calculate the display text width. (:issue:`2612`)
351
350
- ``display.unicode.ambiguous_as_wide``: Whether to handle Unicode characters belong to Ambiguous as Wide. (:issue:`11102`)
@@ -395,11 +394,13 @@ Other enhancements
395
394
396
395
For more, see the :ref:`updated docs <merging.indicator>`
397
396
397
+
- ``pd.to_numeric`` is a new function to coerce strings to numbers (possibly with coercion) (:issue:`11133`)
398
+
398
399
- ``pd.merge`` will now allow duplicate column names if they are not merged upon (:issue:`10639`).
399
400
400
401
- ``pd.pivot`` will now allow passing index as ``None`` (:issue:`3962`).
401
402
402
-
- ``concat`` will now use existing Series names if provided (:issue:`10698`).
403
+
- ``pd.concat`` will now use existing Series names if provided (:issue:`10698`).
403
404
404
405
.. ipython:: python
405
406
@@ -432,7 +433,7 @@ Other enhancements
432
433
ser = pd.Series([np.nan, np.nan, 5, np.nan, np.nan, np.nan, 13])
433
434
ser.interpolate(limit=1, limit_direction='both')
434
435
435
-
- Round DataFrame to variable number of decimal places (:issue:`10568`).
436
+
- Added a ``DataFrame.round`` method to round the values to a variable number of decimal places (:issue:`10568`).
436
437
437
438
.. ipython :: python
438
439
@@ -442,7 +443,7 @@ Other enhancements
442
443
df.round(2)
443
444
df.round({'A': 0, 'C': 2})
444
445
445
-
- ``drop_duplicates`` and ``duplicated`` now accept ``keep`` keyword to target first, last, and all duplicates. ``take_last`` keyword is deprecated, see :ref:`deprecations <whatsnew_0170.deprecations>` (:issue:`6511`, :issue:`8505`)
446
+
- ``drop_duplicates`` and ``duplicated`` now accept a ``keep`` keyword to target first, last, and all duplicates. The ``take_last`` keyword is deprecated, see :ref:`here <whatsnew_0170.deprecations>` (:issue:`6511`, :issue:`8505`)
446
447
447
448
.. ipython :: python
448
449
@@ -476,9 +477,9 @@ Other enhancements
476
477
477
478
- ``DatetimeIndex`` can be instantiated using strings contains ``NaT`` (:issue:`7599`)
478
479
479
-
- ``to_datetime`` can now accept ``yearfirst`` keyword (:issue:`7599`)
480
+
- ``to_datetime`` can now accept the ``yearfirst`` keyword (:issue:`7599`)
480
481
481
-
- ``pandas.tseries.offsets`` larger than the ``Day`` offset can now be used with with ``Series`` for addition/subtraction (:issue:`10699`). See the :ref:`Documentation <timeseries.offsetseries>` for more details.
482
+
- ``pandas.tseries.offsets`` larger than the ``Day`` offset can now be used with a ``Series`` for addition/subtraction (:issue:`10699`). See the :ref:`docs <timeseries.offsetseries>` for more details.
482
483
483
484
- ``pd.Timedelta.total_seconds()`` now returns Timedelta duration to ns precision (previously microsecond precision) (:issue:`10939`)
484
485
@@ -502,27 +503,27 @@ Other enhancements
502
503
503
504
- ``read_sql_table`` will now allow reading from views (:issue:`10750`).
504
505
505
-
- Enable writing complex values to HDF stores when using table format (:issue:`10447`)
506
+
- Enable writing complex values to ``HDFStores`` when using the ``table`` format (:issue:`10447`)
506
507
507
508
- Enable ``pd.read_hdf`` to be used without specifying a key when the HDF file contains a single dataset (:issue:`10443`)
508
509
509
510
- ``pd.read_stata`` will now read Stata 118 type files. (:issue:`9882`)
510
511
511
512
- ``msgpack`` submodule has been updated to 0.4.6 with backward compatibility (:issue:`10581`)
512
513
513
-
- ``DataFrame.to_dict`` now accepts the *index* option in ``orient`` keyword argument (:issue:`10844`).
514
+
- ``DataFrame.to_dict`` now accepts ``orient='index'`` keyword argument (:issue:`10844`).
514
515
515
516
- ``DataFrame.apply`` will return a Series of dicts if the passed function returns a dict and ``reduce=True`` (:issue:`8735`).
516
517
517
518
- Allow passing `kwargs` to the interpolation methods (:issue:`10378`).
518
519
519
-
- Improved error message when concatenating an empty iterable of dataframes (:issue:`9157`)
520
+
- Improved error message when concatenating an empty iterable of ``Dataframe``s (:issue:`9157`)
520
521
521
522
- ``pd.read_csv`` can now read bz2-compressed files incrementally, and the C parser can read bz2-compressed files from AWS S3 (:issue:`11070`, :issue:`11072`).
522
523
523
-
- In ``pd.read_csv``, recognize "s3n://" and "s3a://" URLs as designating S3 file storage (:issue:`11070`, :issue:`11071`).
524
+
- In ``pd.read_csv``, recognize ``s3n://`` and ``s3a://`` URLs as designating S3 file storage (:issue:`11070`, :issue:`11071`).
524
525
525
-
- Read CSV files from AWS S3 incrementally, instead of first downloading the entire file. (Full file download still required for compressed files in Python 2.) (:issue:`11070`, :issue:`11073`)
526
+
- Read CSV files from AWS S3 incrementally, instead of first downloading the entire file. (Full file download still required for compressed files in Python 2.) (:issue:`11070`, :issue:`11073`)
526
527
527
528
- ``pd.read_csv`` is now able to infer compression type for files read from AWS S3 storage (:issue:`11070`, :issue:`11074`).
528
529
@@ -551,9 +552,9 @@ To address these issues, we have revamped the API:
551
552
552
553
- We have introduced a new method, :meth:`DataFrame.sort_values`, which is the merger of ``DataFrame.sort()``, ``Series.sort()``,
553
554
and ``Series.order()``, to handle sorting of **values**.
554
-
- The existing methods ``Series.sort()``, ``Series.order()``, and ``DataFrame.sort()`` has been deprecated and will be removed in a
555
-
future version of pandas.
556
-
- The ``by`` argument of ``DataFrame.sort_index()`` has been deprecated and will be removed in a future version of pandas.
555
+
- The existing methods ``Series.sort()``, ``Series.order()``, and ``DataFrame.sort()`` have been deprecated and will be removed in a
556
+
future version.
557
+
- The ``by`` argument of ``DataFrame.sort_index()`` has been deprecated and will be removed in a future version.
557
558
- The existing method ``.sort_index()`` will gain the ``level`` keyword to enable level sorting.
558
559
559
560
We now have two distinct and non-overlapping methods of sorting. A ``*`` marks items that
@@ -818,7 +819,7 @@ New Behavior:
818
819
819
820
os.remove('file.h5')
820
821
821
-
See :ref:`documentation <io.hdf5>` for more details.
822
+
See the :ref:`docs <io.hdf5>` for more details.
822
823
823
824
.. _whatsnew_0170.api_breaking.display_precision:
824
825
@@ -904,7 +905,7 @@ Other API Changes
904
905
^^^^^^^^^^^^^^^^^
905
906
906
907
- Line and kde plot with ``subplots=True`` now uses default colors, not all black. Specify ``color='k'`` to draw all lines in black (:issue:`9894`)
907
-
- Calling the ``.value_counts()`` method on a Series with ``categorical`` dtype now returns a Series with a ``CategoricalIndex`` (:issue:`10704`)
908
+
- Calling the ``.value_counts()`` method on a Series with a ``categorical`` dtype now returns a Series with a ``CategoricalIndex`` (:issue:`10704`)
908
909
- The metadata properties of subclasses of pandas objects will now be serialized (:issue:`10553`).
909
910
- ``groupby`` using ``Categorical`` follows the same rule as ``Categorical.unique`` described above (:issue:`10508`)
910
911
- When constructing ``DataFrame`` with an array of ``complex64`` dtype previously meant the corresponding column
@@ -959,19 +960,19 @@ Deprecations
959
960
can easily be replaced by using the ``add`` and ``mul`` methods:
960
961
``DataFrame.add(other, fill_value=0)`` and ``DataFrame.mul(other, fill_value=1.)``
961
962
(:issue:`10735`).
962
-
- ``TimeSeries`` deprecated in favor of ``Series`` (note that this has been alias since 0.13.0), (:issue:`10890`)
963
+
- ``TimeSeries`` deprecated in favor of ``Series`` (note that this has been an alias since 0.13.0), (:issue:`10890`)
963
964
- ``SparsePanel`` deprecated and will be removed in a future version (:issue:`11157`).
964
965
- ``Series.is_time_series`` deprecated in favor of ``Series.index.is_all_dates`` (:issue:`11135`)
965
966
- Legacy offsets (like ``'A@JAN'``) listed in :ref:`here <timeseries.legacyaliases>` are deprecated (note that this has been alias since 0.8.0), (:issue:`10878`)
966
967
- ``WidePanel`` deprecated in favor of ``Panel``, ``LongPanel`` in favor of ``DataFrame`` (note these have been aliases since < 0.11.0), (:issue:`10892`)
967
-
- ``DataFrame.convert_objects`` has been deprecated in favor of type-specific function ``pd.to_datetime``, ``pd.to_timestamp`` and ``pd.to_numeric`` (:issue:`11133`).
968
+
- ``DataFrame.convert_objects`` has been deprecated in favor of type-specific functions ``pd.to_datetime``, ``pd.to_timestamp`` and ``pd.to_numeric`` (new in 0.17.0) (:issue:`11133`).
968
969
969
970
.. _whatsnew_0170.prior_deprecations:
970
971
971
972
Removal of prior version deprecations/changes
972
973
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
973
974
974
-
- Removal of ``na_last`` parameters from ``Series.order()`` and ``Series.sort()``, in favor of ``na_position``, xref (:issue:`5231`)
975
+
- Removal of ``na_last`` parameters from ``Series.order()`` and ``Series.sort()``, in favor of ``na_position``. (:issue:`5231`)
975
976
- Remove of ``percentile_width`` from ``.describe()``, in favor of ``percentiles``. (:issue:`7088`)
976
977
- Removal of ``colSpace`` parameter from ``DataFrame.to_string()``, in favor of ``col_space``, circa 0.8.0 version.
977
978
- Removal of automatic time-series broadcasting (:issue:`2304`)
@@ -1032,7 +1033,7 @@ Performance Improvements
1032
1033
- 2x improvement of ``Series.value_counts`` for float dtype (:issue:`10821`)
1033
1034
- Enable ``infer_datetime_format`` in ``to_datetime`` when date components do not have 0 padding (:issue:`11142`)
1034
1035
- Regression from 0.16.1 in constructing ``DataFrame`` from nested dictionary (:issue:`11084`)
1035
-
- Performance improvements in addition/subtraction operations for ``DateOffset`` with ``Series`` or ``DatetimeIndex`` (issue:`10744`, :issue:`11205`)
1036
+
- Performance improvements in addition/subtraction operations for ``DateOffset`` with ``Series`` or ``DatetimeIndex`` (:issue:`10744`, :issue:`11205`)
1036
1037
1037
1038
.. _whatsnew_0170.bug_fixes:
1038
1039
@@ -1071,7 +1072,7 @@ Bug Fixes
1071
1072
- Bug in ``.sample()`` where returned object, if set, gives unnecessary ``SettingWithCopyWarning`` (:issue:`10738`)
1072
1073
- Bug in ``.sample()`` where weights passed as ``Series`` were not aligned along axis before being treated positionally, potentially causing problems if weight indices were not aligned with sampled object. (:issue:`10738`)
1073
1074
1074
-
- Regression fixed in (:issue:`9311`, :issue:`6620`, :issue:`9345`), where groupby with a datetime-like converting to float with certain aggregators (:issue:`10979`)
1075
+
- Regression fixed in (:issue:`9311`, :issue:`6620`, :issue:`9345`), where groupby with a datetime-like converting to float with certain aggregators (:issue:`10979`)
1075
1076
1076
1077
- Bug in ``DataFrame.interpolate`` with ``axis=1`` and ``inplace=True`` (:issue:`10395`)
1077
1078
- Bug in ``io.sql.get_schema`` when specifying multiple columns as primary
0 commit comments