Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d2759d5
ENH: gb.is_monotonic_increasing #17015 fix rebase conflicts
No-Stream Oct 31, 2017
4c70dae
ENH: gb.is_monotonic_increasing #17015 fix rebase conflicts
No-Stream Oct 31, 2017
d88acdd
parametrized tests for gb.is_monotonic_increasing/decreasing
No-Stream Sep 8, 2017
53e5a2b
ENH: gb.is_monotonic_increasing, is_monotonic_decreasing #17015
No-Stream Sep 6, 2017
5a30ee4
added tests for gb.is_monotonically_increasing()/decreasing
No-Stream Sep 7, 2017
2e4bb15
parametrized tests for gb.is_monotonic_increasing/decreasing
No-Stream Sep 8, 2017
3122f1f
removed edits to whatsnew 0.21.0
No-Stream Oct 31, 2017
a6d0640
ENH: gb.is_monotonic_increasing #17015 fix rebase conflicts
No-Stream Oct 31, 2017
4ecc479
ENH: gb.is_monotonic_increasing #17015 fix rebase conflicts
No-Stream Oct 31, 2017
ea42697
rebase and cleanup
jreback Nov 1, 2017
ffb6200
DOC: add docstring for MultiIndex.fillna (#18018) (#18269)
ghasemnaddaf Nov 13, 2017
ee9eb01
ENH: gb.is_monotonic_increasing #17015 fix merge/rebase conflicts
No-Stream Nov 14, 2017
ee9fa7e
ENH: gb.is_monotonic_increasing #17015 tests revised and passing
No-Stream Nov 14, 2017
2c3002f
ENH: gb.is_monotonic_increasing #17015 merged to current upstream/master
No-Stream Nov 29, 2017
f24e476
ENH: gb.is_monotonic_increasing #17015 minor fixes for @jreback
No-Stream Dec 11, 2017
d01b62e
ENH: gb.is_monotonic_increasing #17015 rebase to master
No-Stream Dec 12, 2017
db3e6c0
ENH: gb.is_monotonic_increasing #17015 fix changed whatsnew
No-Stream Dec 12, 2017
fb0bc3c
ENH: gb.is_monotonic_increasing #17015 fix 22.0 whatsnew
No-Stream Dec 12, 2017
e5a90fa
NH: gb.is_monotonic_increasing #17015 alternate version to remove fun…
No-Stream Dec 15, 2017
1a15209
ENH: gb.is_monotonic_increasing #17015 rebase to master
No-Stream Dec 15, 2017
3c13163
Merge branch 'master' into PR_TOOL_MERGE_PR_17453
jreback Jan 5, 2018
d747d35
fixup whatsnew
jreback Jan 5, 2018
dd9a7fc
Resolve v0.23.0.txt merge conflict
gfyoung Feb 11, 2018
495718c
Merge branch 'master' into is-monotonic-increasing-gb-method
gfyoung Feb 11, 2018
02d4369
typo
jorisvandenbossche Feb 11, 2018
13d4dd9
Add ticks for function rendering
gfyoung Feb 12, 2018
787c436
Make whatsnew statement more concise
gfyoung Feb 12, 2018
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into PR_TOOL_MERGE_PR_17453
  • Loading branch information
jreback committed Jan 5, 2018
commit 3c13163c2c1396cc3950e39af65bea03fc1ead2c
166 changes: 29 additions & 137 deletions doc/source/whatsnew/v0.22.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,143 +3,9 @@
v0.22.0 (December 29, 2017)
---------------------------

This is a major release from 0.21.1 and includes a number of API changes,
deprecations, new features, enhancements, and performance improvements along
with a large number of bug fixes. We recommend that all users upgrade to this
version.

.. _whatsnew_0220.enhancements:

New features
~~~~~~~~~~~~

-
-
-


.. _whatsnew_0210.enhancements.get_dummies_dtype:

``get_dummies`` now supports ``dtype`` argument
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The :func:`get_dummies` now accepts a ``dtype`` argument, which specifies a dtype for the new columns. The default remains uint8. (:issue:`18330`)

.. ipython:: python

df = pd.DataFrame({'a': [1, 2], 'b': [3, 4], 'c': [5, 6]})
pd.get_dummies(df, columns=['c']).dtypes
pd.get_dummies(df, columns=['c'], dtype=bool).dtypes


.. _whatsnew_0220.enhancements.merge_on_columns_and_levels:

Merging on a combination of columns and index levels
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Strings passed to :meth:`DataFrame.merge` as the ``on``, ``left_on``, and ``right_on``
parameters may now refer to either column names or index level names.
This enables merging ``DataFrame`` instances on a combination of index levels
and columns without resetting indexes. See the :ref:`Merge on columns and
levels <merging.merge_on_columns_and_levels>` documentation section.
(:issue:`14355`)

.. ipython:: python

left_index = pd.Index(['K0', 'K0', 'K1', 'K2'], name='key1')

left = pd.DataFrame({'A': ['A0', 'A1', 'A2', 'A3'],
'B': ['B0', 'B1', 'B2', 'B3'],
'key2': ['K0', 'K1', 'K0', 'K1']},
index=left_index)

right_index = pd.Index(['K0', 'K1', 'K2', 'K2'], name='key1')

right = pd.DataFrame({'C': ['C0', 'C1', 'C2', 'C3'],
'D': ['D0', 'D1', 'D2', 'D3'],
'key2': ['K0', 'K0', 'K0', 'K1']},
index=right_index)

left.merge(right, on=['key1', 'key2'])


.. _whatsnew_0220.enhancements.ran_inf:

``.rank()`` handles ``inf`` values when ``NaN`` are present
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

In previous versions, ``.rank()`` would assign ``inf`` elements ``NaN`` as their ranks. Now ranks are calculated properly. (:issue:`6945`)

.. ipython:: python

s = pd.Series([-np.inf, 0, 1, np.nan, np.inf])
s

Previous Behavior:

.. code-block:: ipython

In [11]: s.rank()
Out[11]:
0 1.0
1 2.0
2 3.0
3 NaN
4 NaN
dtype: float64

Current Behavior

.. ipython:: python

s.rank()

Furthermore, previously if you rank ``inf`` or ``-inf`` values together with ``NaN`` values, the calculation won't distinguish ``NaN`` from infinity when using 'top' or 'bottom' argument.

.. ipython:: python

s = pd.Series([np.nan, np.nan, -np.inf, -np.inf])
s

Previous Behavior:

.. code-block:: ipython

In [15]: s.rank(na_option='top')
Out[15]:
0 2.5
1 2.5
2 2.5
3 2.5
dtype: float64

Current Behavior

.. ipython:: python

s.rank(na_option='top')

.. _whatsnew_0220.enhancements.other:

Other Enhancements
^^^^^^^^^^^^^^^^^^

- Better support for :func:`Dataframe.style.to_excel` output with the ``xlsxwriter`` engine. (:issue:`16149`)
- :func:`pandas.tseries.frequencies.to_offset` now accepts leading '+' signs e.g. '+1h'. (:issue:`18171`)
- :func:`MultiIndex.unique` now supports the ``level=`` argument, to get unique values from a specific index level (:issue:`17896`)
- :class:`pandas.io.formats.style.Styler` now has method ``hide_index()`` to determine whether the index will be rendered in ouptut (:issue:`14194`)
- :class:`pandas.io.formats.style.Styler` now has method ``hide_columns()`` to determine whether columns will be hidden in output (:issue:`14194`)
- Improved wording of ``ValueError`` raised in :func:`to_datetime` when ``unit=`` is passed with a non-convertible value (:issue:`14350`)
- :func:`Series.fillna` now accepts a Series or a dict as a ``value`` for a categorical dtype (:issue:`17033`)
- :func:`pandas.read_clipboard` updated to use qtpy, falling back to PyQt5 and then PyQt4, adding compatibility with Python3 and multiple python-qt bindings (:issue:`17722`)
- Improved wording of ``ValueError`` raised in :func:`read_csv` when the ``usecols`` argument cannot match all columns. (:issue:`17301`)
- :func:`DataFrame.corrwith` now silently drops non-numeric columns when passed a Series. Before, an exception was raised (:issue:`18570`).
- :class:`IntervalIndex` now supports time zone aware ``Interval`` objects (:issue:`18537`, :issue:`18538`)
- :func:`Series` / :func:`DataFrame` tab completion also returns identifiers in the first level of a :func:`MultiIndex`. (:issue:`16326`)
- :func:`read_excel()` has gained the ``nrows`` parameter (:issue:`16645`)
- :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`)
- ``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`)
- :func: groupby.is_monotonic_increasing and :func: .is_monotonic_decreasing extend :func: Series.is_monotonic_increasing to groups, returning whether each group is monotonically increasing or decreasing, respectively. (:issue:`17015`)
This is a major release from 0.21.1 and includes a single, API-breaking change.
We recommend that all users upgrade to this version after carefully reading the
release note (singular!).

.. _whatsnew_0220.api_breaking:

Expand Down Expand Up @@ -313,8 +179,34 @@ entirely valid.

.. ipython:: python

<<<<<<< HEAD
s.rank(na_option='top')

.. _whatsnew_0220.enhancements.other:

Other Enhancements
^^^^^^^^^^^^^^^^^^

- Better support for :func:`Dataframe.style.to_excel` output with the ``xlsxwriter`` engine. (:issue:`16149`)
- :func:`pandas.tseries.frequencies.to_offset` now accepts leading '+' signs e.g. '+1h'. (:issue:`18171`)
- :func:`MultiIndex.unique` now supports the ``level=`` argument, to get unique values from a specific index level (:issue:`17896`)
- :class:`pandas.io.formats.style.Styler` now has method ``hide_index()`` to determine whether the index will be rendered in ouptut (:issue:`14194`)
- :class:`pandas.io.formats.style.Styler` now has method ``hide_columns()`` to determine whether columns will be hidden in output (:issue:`14194`)
- Improved wording of ``ValueError`` raised in :func:`to_datetime` when ``unit=`` is passed with a non-convertible value (:issue:`14350`)
- :func:`Series.fillna` now accepts a Series or a dict as a ``value`` for a categorical dtype (:issue:`17033`)
- :func:`pandas.read_clipboard` updated to use qtpy, falling back to PyQt5 and then PyQt4, adding compatibility with Python3 and multiple python-qt bindings (:issue:`17722`)
- Improved wording of ``ValueError`` raised in :func:`read_csv` when the ``usecols`` argument cannot match all columns. (:issue:`17301`)
- :func:`DataFrame.corrwith` now silently drops non-numeric columns when passed a Series. Before, an exception was raised (:issue:`18570`).
- :class:`IntervalIndex` now supports time zone aware ``Interval`` objects (:issue:`18537`, :issue:`18538`)
- :func:`Series` / :func:`DataFrame` tab completion also returns identifiers in the first level of a :func:`MultiIndex`. (:issue:`16326`)
- :func:`read_excel()` has gained the ``nrows`` parameter (:issue:`16645`)
- :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`)
- ``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`)
- :func: groupby.is_monotonic_increasing and :func: .is_monotonic_decreasing extend :func: Series.is_monotonic_increasing to groups, returning whether each group is monotonically increasing or decreasing, respectively. (:issue:`17015`)
=======
idx = pd.DatetimeIndex(['2017-01-01', '2017-01-02'])
pd.Series([1, 2], index=idx).resample("12H").sum()
>>>>>>> master

Once again, the ``min_count`` keyword is available to restore the 0.21 behavior.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.