Skip to content

Commit d09ab11

Browse files
committed
DOC: whatsnew 0.17.0 edits
1 parent 7427205 commit d09ab11

File tree

3 files changed

+45
-40
lines changed

3 files changed

+45
-40
lines changed

doc/source/io.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ object.
3939
* :ref:`read_json<io.json_reader>`
4040
* :ref:`read_msgpack<io.msgpack>` (experimental)
4141
* :ref:`read_html<io.read_html>`
42-
* :ref:`read_gbq<io.bigquery>` (experimental)
42+
* :ref:`read_gbq<io.bigquery_reader>` (experimental)
4343
* :ref:`read_stata<io.stata_reader>`
4444
* :ref:`read_sas<io.sas_reader>`
4545
* :ref:`read_clipboard<io.clipboard>`
@@ -54,7 +54,7 @@ The corresponding ``writer`` functions are object methods that are accessed like
5454
* :ref:`to_json<io.json_writer>`
5555
* :ref:`to_msgpack<io.msgpack>` (experimental)
5656
* :ref:`to_html<io.html>`
57-
* :ref:`to_gbq<io.bigquery>` (experimental)
57+
* :ref:`to_gbq<io.bigquery_writer>` (experimental)
5858
* :ref:`to_stata<io.stata_writer>`
5959
* :ref:`to_clipboard<io.clipboard>`
6060
* :ref:`to_pickle<io.pickle>`
@@ -4063,6 +4063,8 @@ The key functions are:
40634063

40644064
.. currentmodule:: pandas
40654065

4066+
.. _io.bigquery_reader:
4067+
40664068
Querying
40674069
''''''''
40684070

@@ -4102,6 +4104,8 @@ destination DataFrame as well as a preferred column order as follows:
41024104

41034105
You can toggle the verbose output via the ``verbose`` flag which defaults to ``True``.
41044106

4107+
.. _io.bigquery_writer:
4108+
41054109
Writing DataFrames
41064110
''''''''''''''''''
41074111

doc/source/options.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ By default, "Ambiguous" character's width, "¡" (inverted exclamation) in below
484484
485485
.. image:: _static/option_unicode03.png
486486

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.
488488

489489
.. ipython:: python
490490

doc/source/whatsnew/v0.17.0.txt

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Releasing the GIL
126126

127127
We are releasing the global-interpreter-lock (GIL) on some cython operations.
128128
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`)
130130

131131
For example the groupby expression in the following code will have the GIL released during the factorization step, e.g. ``df.groupby('key')``
132132
as well as the ``.sum()`` operation.
@@ -139,7 +139,7 @@ as well as the ``.sum()`` operation.
139139
'data' : np.random.randn(N) })
140140
df.groupby('key')['data'].sum()
141141

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.
143143

144144
.. _dask: https://dask.readthedocs.org/en/latest/
145145
.. _QT: https://wiki.python.org/moin/PyQt
@@ -216,9 +216,9 @@ total_seconds
216216
Period Frequency Enhancement
217217
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218218

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`)
220220

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.
222222

223223
.. ipython:: python
224224

@@ -229,7 +229,7 @@ Multiplied freq represents a span of corresponding length. Below example creates
229229
p.to_timestamp()
230230
p.to_timestamp(how='E')
231231

232-
You can use multiplied freq in ``PeriodIndex`` and ``period_range``.
232+
You can use the multiplied freq in ``PeriodIndex`` and ``period_range``.
233233

234234
.. ipython:: python
235235

@@ -274,15 +274,15 @@ The support math functions are `sin`, `cos`, `exp`, `log`, `expm1`, `log1p`,
274274
`sqrt`, `sinh`, `cosh`, `tanh`, `arcsin`, `arccos`, `arctan`, `arccosh`,
275275
`arcsinh`, `arctanh`, `abs` and `arctan2`.
276276

277-
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.
279279

280280
Changes to Excel with ``MultiIndex``
281281
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
282282

283283
In version 0.16.2 a ``DataFrame`` with ``MultiIndex`` columns could not be written to Excel via ``to_excel``.
284284
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``
286286
in the ``header`` and ``index_col`` parameters (:issue:`4679`)
287287

288288
See the :ref:`documentation <io.excel>` for more details.
@@ -307,8 +307,8 @@ See the :ref:`documentation <io.excel>` for more details.
307307
import os
308308
os.remove('test.xlsx')
309309

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``
312312
has been changed to make this keyword unnecessary - the change is shown below.
313313

314314
**Old**
@@ -328,24 +328,23 @@ has been changed to make this keyword unnecessary - the change is shown below.
328328

329329
Google BigQuery Enhancements
330330
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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`).
334333
- ``InvalidColumnOrder`` and ``InvalidPageToken`` in the gbq module will raise ``ValueError`` instead of ``IOError``.
335334
- 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`).
337336

338337
.. _whatsnew_0170.east_asian_width:
339338

340-
Display Alignemnt with Unicode East Asian Width
339+
Display Alignment with Unicode East Asian Width
341340
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
342341

343342
.. warning::
344343

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).
346345
Use only when it is actually required.
347346

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.
349348

350349
- ``display.unicode.east_asian_width``: Whether to use the Unicode East Asian Width to calculate the display text width. (:issue:`2612`)
351350
- ``display.unicode.ambiguous_as_wide``: Whether to handle Unicode characters belong to Ambiguous as Wide. (:issue:`11102`)
@@ -395,11 +394,13 @@ Other enhancements
395394

396395
For more, see the :ref:`updated docs <merging.indicator>`
397396

397+
- ``pd.to_numeric`` is a new function to coerce strings to numbers (possibly with coercion) (:issue:`11133`)
398+
398399
- ``pd.merge`` will now allow duplicate column names if they are not merged upon (:issue:`10639`).
399400

400401
- ``pd.pivot`` will now allow passing index as ``None`` (:issue:`3962`).
401402

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`).
403404

404405
.. ipython:: python
405406

@@ -432,7 +433,7 @@ Other enhancements
432433
ser = pd.Series([np.nan, np.nan, 5, np.nan, np.nan, np.nan, 13])
433434
ser.interpolate(limit=1, limit_direction='both')
434435

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`).
436437

437438
.. ipython :: python
438439

@@ -442,7 +443,7 @@ Other enhancements
442443
df.round(2)
443444
df.round({'A': 0, 'C': 2})
444445

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`)
446447

447448
.. ipython :: python
448449

@@ -476,9 +477,9 @@ Other enhancements
476477

477478
- ``DatetimeIndex`` can be instantiated using strings contains ``NaT`` (:issue:`7599`)
478479

479-
- ``to_datetime`` can now accept ``yearfirst`` keyword (:issue:`7599`)
480+
- ``to_datetime`` can now accept the ``yearfirst`` keyword (:issue:`7599`)
480481

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.
482483

483484
- ``pd.Timedelta.total_seconds()`` now returns Timedelta duration to ns precision (previously microsecond precision) (:issue:`10939`)
484485

@@ -502,27 +503,27 @@ Other enhancements
502503

503504
- ``read_sql_table`` will now allow reading from views (:issue:`10750`).
504505

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`)
506507

507508
- Enable ``pd.read_hdf`` to be used without specifying a key when the HDF file contains a single dataset (:issue:`10443`)
508509

509510
- ``pd.read_stata`` will now read Stata 118 type files. (:issue:`9882`)
510511

511512
- ``msgpack`` submodule has been updated to 0.4.6 with backward compatibility (:issue:`10581`)
512513

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`).
514515

515516
- ``DataFrame.apply`` will return a Series of dicts if the passed function returns a dict and ``reduce=True`` (:issue:`8735`).
516517

517518
- Allow passing `kwargs` to the interpolation methods (:issue:`10378`).
518519

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`)
520521

521522
- ``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`).
522523

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`).
524525

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`)
526527

527528
- ``pd.read_csv`` is now able to infer compression type for files read from AWS S3 storage (:issue:`11070`, :issue:`11074`).
528529

@@ -551,9 +552,9 @@ To address these issues, we have revamped the API:
551552

552553
- We have introduced a new method, :meth:`DataFrame.sort_values`, which is the merger of ``DataFrame.sort()``, ``Series.sort()``,
553554
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.
557558
- The existing method ``.sort_index()`` will gain the ``level`` keyword to enable level sorting.
558559

559560
We now have two distinct and non-overlapping methods of sorting. A ``*`` marks items that
@@ -818,7 +819,7 @@ New Behavior:
818819

819820
os.remove('file.h5')
820821

821-
See :ref:`documentation <io.hdf5>` for more details.
822+
See the :ref:`docs <io.hdf5>` for more details.
822823

823824
.. _whatsnew_0170.api_breaking.display_precision:
824825

@@ -904,7 +905,7 @@ Other API Changes
904905
^^^^^^^^^^^^^^^^^
905906

906907
- 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`)
908909
- The metadata properties of subclasses of pandas objects will now be serialized (:issue:`10553`).
909910
- ``groupby`` using ``Categorical`` follows the same rule as ``Categorical.unique`` described above (:issue:`10508`)
910911
- When constructing ``DataFrame`` with an array of ``complex64`` dtype previously meant the corresponding column
@@ -959,19 +960,19 @@ Deprecations
959960
can easily be replaced by using the ``add`` and ``mul`` methods:
960961
``DataFrame.add(other, fill_value=0)`` and ``DataFrame.mul(other, fill_value=1.)``
961962
(: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`)
963964
- ``SparsePanel`` deprecated and will be removed in a future version (:issue:`11157`).
964965
- ``Series.is_time_series`` deprecated in favor of ``Series.index.is_all_dates`` (:issue:`11135`)
965966
- 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`)
966967
- ``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`).
968969

969970
.. _whatsnew_0170.prior_deprecations:
970971

971972
Removal of prior version deprecations/changes
972973
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
973974

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`)
975976
- Remove of ``percentile_width`` from ``.describe()``, in favor of ``percentiles``. (:issue:`7088`)
976977
- Removal of ``colSpace`` parameter from ``DataFrame.to_string()``, in favor of ``col_space``, circa 0.8.0 version.
977978
- Removal of automatic time-series broadcasting (:issue:`2304`)
@@ -1032,7 +1033,7 @@ Performance Improvements
10321033
- 2x improvement of ``Series.value_counts`` for float dtype (:issue:`10821`)
10331034
- Enable ``infer_datetime_format`` in ``to_datetime`` when date components do not have 0 padding (:issue:`11142`)
10341035
- 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`)
10361037

10371038
.. _whatsnew_0170.bug_fixes:
10381039

@@ -1071,7 +1072,7 @@ Bug Fixes
10711072
- Bug in ``.sample()`` where returned object, if set, gives unnecessary ``SettingWithCopyWarning`` (:issue:`10738`)
10721073
- 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`)
10731074

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`)
10751076

10761077
- Bug in ``DataFrame.interpolate`` with ``axis=1`` and ``inplace=True`` (:issue:`10395`)
10771078
- Bug in ``io.sql.get_schema`` when specifying multiple columns as primary

0 commit comments

Comments
 (0)