DOC: small whatsnew fixes (#20847) · pandas-dev/pandas@563a6ad (original) (raw)

`@@ -365,7 +365,7 @@ for storing ip addresses.

`

365

365

` ...:

`

366

366

``

367

367

``` IPArray isn't a normal 1-D NumPy array, but because it's a pandas


`368`

``

`` -

:ref:`~pandas.api.extension.ExtensionArray, it can be stored properly inside pandas' containers.

``

``

`368`

`` +

:ref:`~pandas.api.extension.ExtensionArray`, it can be stored properly inside pandas' containers.

``

`369`

`369`

``

`370`

`370`

`.. code-block:: ipython

`

`371`

`371`

``

`@@ -402,7 +402,7 @@ Other Enhancements

`

`402`

`402`

`^^^^^^^^^^^^^^^^^^

`

`403`

`403`

``

`404`

`404`

``` - Unary ``+`` now permitted for ``Series`` and ``DataFrame`` as numeric operator (:issue:`16073`)

405

``


- Better support for :func:`Dataframe.style.to_excel` output with the ``xlsxwriter`` engine. (:issue:`16149`)

``

405


- Better support for :meth:`~pandas.io.formats.style.Styler.to_excel` output with the ``xlsxwriter`` engine. (:issue:`16149`)

406

406

`` - :func:pandas.tseries.frequencies.to_offset now accepts leading '+' signs e.g. '+1h'. (:issue:18171)

``

407

407

``` - :func:MultiIndex.unique now supports the level= argument, to get unique values from a specific index level (:issue:17896)


`408`

`408`

``` - :class:`pandas.io.formats.style.Styler` now has method ``hide_index()`` to determine whether the index will be rendered in output (:issue:`14194`)

`@@ -416,7 +416,7 @@ Other Enhancements

`

416

416

`` - :func:Series / :func:DataFrame tab completion also returns identifiers in the first level of a :func:MultiIndex. (:issue:16326)

``

417

417

``` - :func:read_excel() has gained the nrows parameter (:issue:16645)


`418`

`418`

``` - :meth:`DataFrame.append` can now in more cases preserve the type of the calling dataframe's columns (e.g. if both are ``CategoricalIndex``) (:issue:`18359`)

419

``


- :func:``DataFrame.to_json`` and ``Series.to_json`` now accept an ``index`` argument which allows the user to exclude the index from the JSON output (:issue:`17394`)

``

419


- :meth:`DataFrame.to_json` and :meth:`Series.to_json` now accept an ``index`` argument which allows the user to exclude the index from the JSON output (:issue:`17394`)

420

420

``` - IntervalIndex.to_tuples() has gained the na_tuple parameter to control whether NA is returned as a tuple of NA, or NA itself (:issue:18756)


`421`

`421`

``` - ``Categorical.rename_categories``, ``CategoricalIndex.rename_categories`` and :attr:`Series.cat.rename_categories`

422

422

`` can now take a callable as their argument (:issue:18862)

``

`@@ -433,7 +433,7 @@ Other Enhancements

`

433

433

``

434

434

``` - IntervalIndex.astype now supports conversions between subtypes when passed an IntervalDtype (:issue:19197)


`435`

`435`

``` - :class:`IntervalIndex` and its associated constructor methods (``from_arrays``, ``from_breaks``, ``from_tuples``) have gained a ``dtype`` parameter (:issue:`19262`)

436

``

`` -

``

``

436

`` +

``

437

437

``` - For subclassed DataFrames, :func:DataFrame.apply will now preserve the Series subclass (if defined) when passing the data to the applied function (:issue:19822)


`438`

`438`

``` - :func:`DataFrame.from_dict` now accepts a ``columns`` argument that can be used to specify the column names when ``orient='index'`` is used (:issue:`18529`)

439

439

``` - Added option display.html.use_mathjax so MathJax <https://www.mathjax.org/>_ can be disabled when rendering tables in Jupyter notebooks (:issue:19856, :issue:19824)


`@@ -443,11 +443,11 @@ Other Enhancements

`

`443`

`443`

`` - :meth:`DataFrame.to_sql` now performs a multivalue insert if the underlying connection supports itk rather than inserting row by row.

``

`444`

`444`

```  ``SQLAlchemy`` dialects supporting multivalue inserts include: ``mysql``, ``postgresql``, ``sqlite`` and any dialect with ``supports_multivalues_insert``. (:issue:`14315`, :issue:`8953`)

445

445

``` - :func:read_html now accepts a displayed_only keyword argument to controls whether or not hidden elements are parsed (True by default) (:issue:20027)


`446`

``

``` -

- :meth:`Rolling.quantile` and :meth:`Expanding.quantile` now accept the ``interpolation`` keyword, ``linear`` by default (:issue:`20497`)

``

446


- :meth:`~pandas.core.window.Rolling.quantile` and :meth:`~pandas.core.window.Expanding.quantile` now accept the ``interpolation`` keyword, ``linear`` by default (:issue:`20497`)

447

447

``` - zip compression is supported via compression=zip in :func:DataFrame.to_pickle, :func:Series.to_pickle, :func:DataFrame.to_csv, :func:Series.to_csv, :func:DataFrame.to_json, :func:Series.to_json. (:issue:17778)


`448`

``

``` -

- :class:`WeekOfMonth` constructor now supports ``n=0`` (:issue:`20517`).

``

448


- :class:`pandas.tseries.api.offsets.WeekOfMonth` constructor now supports ``n=0`` (:issue:`20517`).

449

449

```` - :class:DataFrame and :class:Series now support matrix multiplication (@) operator (:issue:10259) for Python>=3.5

````

450

``


- Updated ``to_gbq`` and ``read_gbq`` signature and documentation to reflect changes from

``

450

`` +

``

451

451

` the Pandas-GBQ library version 0.4.0. Adds intersphinx mapping to Pandas-GBQ

`

452

452

`` library. (:issue:20564)

``

453

453

``

`` @@ -979,7 +979,7 @@ read the NumFOCUS blogpost_ recapping the sprint.

``

979

979

``

980

980

`.. _GitHub search: https://github.com/pandas-dev/pandas/pulls?utf8=%E2%9C%93&q=is%3Apr+label%3ADocs+created%3A2018-03-10..2018-03-15+

`

981

981

`.. _NumFOCUS blogpost: https://www.numfocus.org/blog/worldwide-pandas-sprint/

`

982

``

`-

.. _Marc Garica: https://github.com/datapythonista

`

``

982

`+

.. _Marc Garcia: https://github.com/datapythonista

`

983

983

``

984

984

`` - Changed spelling of "numpy" to "NumPy", and "python" to "Python". (:issue:19017)

``

985

985

`- Consistency when introducing code samples, using either colon or period.

`

`@@ -1019,8 +1019,8 @@ Categorical

`

1019

1019

`` - Bug in :meth:Index.astype with a categorical dtype where the resultant index is not converted to a :class:CategoricalIndex for all types of index (:issue:18630)

``

1020

1020

``` - Bug in :meth:Series.astype and Categorical.astype() where an existing categorical data does not get updated (:issue:10696, :issue:18593)


`1021`

`1021`

``` - Bug in :meth:`Series.str.split` with ``expand=True`` incorrectly raising an IndexError on empty strings (:issue:`20002`).

1022

``


- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19032`)

1023

``


- Bug in :class:`Series` constructor with scalar and ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (issue:`19565`)

``

1022


- Bug in :class:`Index` constructor with ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (:issue:`19032`)

``

1023


- Bug in :class:`Series` constructor with scalar and ``dtype=CategoricalDtype(...)`` where ``categories`` and ``ordered`` are not maintained (:issue:`19565`)

1024

1024

``` - Bug in Categorical.__iter__ not converting to Python types (:issue:19909)


`1025`

`1025`

``` - Bug in :func:`pandas.factorize` returning the unique codes for the ``uniques``. This now returns a ``Categorical`` with the same dtype as the input (:issue:`19721`)

1026

1026

``` - Bug in :func:pandas.factorize including an item for missing values in the uniques return value (:issue:19721)

```