diff --git a/doc/source/release.rst b/doc/source/release.rst index 58232e226e277..f02b286365ea7 100644 --- a/doc/source/release.rst +++ b/doc/source/release.rst @@ -91,6 +91,7 @@ API Changes - ``microsecond,nanosecond,qyear`` - ``min(),max()`` - ``pd.infer_freq()`` + - ``pd.infer_freq()`` will now raise a ``TypeError`` if given an invalid ``Series/Index`` type (:issue:`6407`, :issue:`6463`) @@ -99,12 +100,12 @@ API Changes (:issue:`5987`). For the :class:`~pandas.DataFrame` methods, two things have changed - - Column names are now given precedence over locals - - Local variables must be referred to explicitly. This means that even if - you have a local variable that is *not* a column you must still refer to - it with the ``'@'`` prefix. - - You can have an expression like ``df.query('@a < a')`` with no complaints - from ``pandas`` about ambiguity of the name ``a``. + - Column names are now given precedence over locals + - Local variables must be referred to explicitly. This means that even if + you have a local variable that is *not* a column you must still refer to + it with the ``'@'`` prefix. + - You can have an expression like ``df.query('@a < a')`` with no complaints + from ``pandas`` about ambiguity of the name ``a``. - The top-level :func:`pandas.eval` function does not allow you use the ``'@'`` prefix and provides you with an error message telling you so. @@ -115,6 +116,7 @@ API Changes longer change type of the resulting index (:issue:`6440`). - ``set_index`` no longer converts MultiIndexes to an Index of tuples (:issue:`6459`). - Slicing with negative start, stop & step values handles corner cases better (:issue:`6531`): + - ``df.iloc[:-len(df)]`` is now empty - ``df.iloc[len(df)::-1]`` now enumerates all elements in reverse @@ -136,16 +138,15 @@ API Changes - Fix a bug where invalid eval/query operations would blow the stack (:issue:`5198`) -- Following keywords are now acceptable for :meth:`DataFrame.plot(kind='bar')` and :meth:`DataFrame.plot(kind='barh')`. +- Following keywords are now acceptable for :meth:`DataFrame.plot` with ``kind='bar'`` and ``kind='barh'``: - `width`: Specify the bar width. In previous versions, static value 0.5 was passed to matplotlib and it cannot be overwritten. (:issue:`6604`) - `align`: Specify the bar alignment. Default is `center` (different from matplotlib). In previous versions, pandas passes `align='edge'` to matplotlib and adjust the location to `center` by itself, and it results `align` keyword is not applied as expected. (:issue:`4525`) - - `position`: Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1(right/top-end). Default is 0.5 (center). (:issue:`6604`) + - `position`: Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1 (right/top-end). Default is 0.5 (center). (:issue:`6604`) -- Define and document the order of column vs index names in query/eval - (:issue:`6676`) +- Define and document the order of column vs index names in query/eval (:issue:`6676`) - ``DataFrame.sort`` now places NaNs at the beginning or end of the sort according to the ``na_position`` parameter. (:issue:`3917`) diff --git a/doc/source/v0.14.0.txt b/doc/source/v0.14.0.txt index 344198d6e5ef1..428e7936ee126 100644 --- a/doc/source/v0.14.0.txt +++ b/doc/source/v0.14.0.txt @@ -22,23 +22,23 @@ API changes values. A single indexer / list of indexers that is out-of-bounds will still raise ``IndexError`` (:issue:`6296`, :issue:`6299`). This could result in an empty axis (e.g. an empty DataFrame being returned) -.. ipython:: python + .. ipython:: python - dfl = DataFrame(np.random.randn(5,2),columns=list('AB')) - dfl - dfl.iloc[:,2:3] - dfl.iloc[:,1:3] - dfl.iloc[4:6] + dfl = DataFrame(np.random.randn(5,2),columns=list('AB')) + dfl + dfl.iloc[:,2:3] + dfl.iloc[:,1:3] + dfl.iloc[4:6] -These are out-of-bounds selections + These are out-of-bounds selections -.. code-block:: python + .. code-block:: python - dfl.iloc[[4,5,6]] - IndexError: positional indexers are out-of-bounds + dfl.iloc[[4,5,6]] + IndexError: positional indexers are out-of-bounds - dfl.iloc[:,4] - IndexError: single positional indexer is out-of-bounds + dfl.iloc[:,4] + IndexError: single positional indexer is out-of-bounds - The ``DataFrame.interpolate()`` ``downcast`` keyword default has been changed from ``infer`` to @@ -181,7 +181,7 @@ These are out-of-bounds selections - `position`: Specify relative alignments for bar plot layout. From 0 (left/bottom-end) to 1(right/top-end). Default is 0.5 (center). (:issue:`6604`) - Because of the default `align` value changes, coordinates of bar plots are now located on integer values (0.0, 1.0, 2.0 ...). This is intended to make bar plot be located on the same coodinates as line plot. However, bar plot may differs unexpectedly when you manually adjust the bar location or drawing area, such as using `set_xlim`, `set_ylim`, etc. In this cases, please modify your script to meet with new coordinates. + Because of the default `align` value changes, coordinates of bar plots are now located on integer values (0.0, 1.0, 2.0 ...). This is intended to make bar plot be located on the same coodinates as line plot. However, bar plot may differs unexpectedly when you manually adjust the bar location or drawing area, such as using `set_xlim`, `set_ylim`, etc. In this cases, please modify your script to meet with new coordinates. - ``pairwise`` keyword was added to the statistical moment functions ``rolling_cov``, ``rolling_corr``, ``ewmcov``, ``ewmcorr``, diff --git a/pandas/core/index.py b/pandas/core/index.py index 32c1672566da0..3213f288be4b3 100644 --- a/pandas/core/index.py +++ b/pandas/core/index.py @@ -1059,7 +1059,7 @@ def diff(self, other): def sym_diff(self, other, result_name=None): """ - Compute the sorted symmetric_difference of two Index objects. + Compute the sorted symmetric difference of two Index objects. Parameters ---------- @@ -1077,7 +1077,7 @@ def sym_diff(self, other, result_name=None): ``idx2`` but not both. Equivalent to the Index created by ``(idx1 - idx2) + (idx2 - idx1)`` with duplicates dropped. - The sorting of a result containing ``NaN``s is not guaranteed + The sorting of a result containing ``NaN`` values is not guaranteed across Python versions. See GitHub issue #6444. Examples