Skip to content

Commit 0f6c846

Browse files
committed
DOC: whatsnew 0.22.0 edits
1 parent 3857446 commit 0f6c846

File tree

1 file changed

+11
-42
lines changed

1 file changed

+11
-42
lines changed

doc/source/whatsnew/v0.22.0.txt

+11-42
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,7 @@ In previous version, ``inf`` elements were assigned ``NaN`` as their ranks. Now
7272

7373
.. ipython:: python
7474

75-
In [9]: s = pd.Series([-np.inf, 0, 1, np.nan, np.inf])
76-
77-
In [10]: s
78-
Out[10]:
79-
0 -inf
80-
1 0.000000
81-
2 1.000000
82-
3 NaN
83-
4 inf
84-
dtype: float64
75+
s = pd.Series([-np.inf, 0, 1, np.nan, np.inf])
8576

8677
Previous Behavior:
8778

@@ -100,28 +91,13 @@ Current Behavior
10091

10192
.. ipython:: python
10293

103-
In [4]: s.rank()
104-
Out[4]:
105-
0 1.0
106-
1 2.0
107-
2 3.0
108-
3 NaN
109-
4 4.0
110-
dtype: float64
94+
s.rank()
11195

11296
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.
11397

11498
.. ipython:: python
11599

116-
In [14]: s = pd.Series([np.nan, np.nan, -np.inf, -np.inf])
117-
118-
In [15]: s
119-
Out[15]:
120-
0 NaN
121-
1 NaN
122-
2 -inf
123-
3 -inf
124-
dtype: float64
100+
s = pd.Series([np.nan, np.nan, -np.inf, -np.inf])
125101

126102
Previous Behavior:
127103

@@ -139,14 +115,7 @@ Current Behavior
139115

140116
.. ipython:: python
141117

142-
In [4]: s.rank(na_option='top')
143-
Out[4]:
144-
0 1.5
145-
1 1.5
146-
2 3.5
147-
3 3.5
148-
dtype: float64
149-
118+
s.rank(na_option='top')
150119

151120
.. _whatsnew_0220.enhancements.other:
152121

@@ -222,7 +191,7 @@ Deprecations
222191

223192
- ``Series.from_array`` and ``SparseSeries.from_array`` are deprecated. Use the normal constructor ``Series(..)`` and ``SparseSeries(..)`` instead (:issue:`18213`).
224193
- ``DataFrame.as_matrix`` is deprecated. Use ``DataFrame.values`` instead (:issue:`18458`).
225-
- ``Series.asobject``, ``DatetimeIndex.asobject``, ``PeriodIndex.asobject`` and ``TimeDeltaIndex.asobject`` have been deprecated. Use '.astype(object)' instead (:issue:`18572`)
194+
- ``Series.asobject``, ``DatetimeIndex.asobject``, ``PeriodIndex.asobject`` and ``TimeDeltaIndex.asobject`` have been deprecated. Use ``.astype(object)`` instead (:issue:`18572`)
226195

227196
.. _whatsnew_0220.prior_deprecations:
228197

@@ -254,7 +223,7 @@ Performance Improvements
254223
- The overriden ``Timedelta`` properties of days, seconds and microseconds have been removed, leveraging their built-in Python versions instead (:issue:`18242`)
255224
- ``Series`` construction will reduce the number of copies made of the input data in certain cases (:issue:`17449`)
256225
- Improved performance of :func:`Series.dt.date` and :func:`DatetimeIndex.date` (:issue:`18058`)
257-
- Improved performance of ``IntervalIndex.symmetric_difference()`` (:issue:`18475`)
226+
- Improved performance of :func:`IntervalIndex.symmetric_difference()` (:issue:`18475`)
258227
- Improved performance of ``DatetimeIndex`` and ``Series`` arithmetic operations with Business-Month and Business-Quarter frequencies (:issue:`18489`)
259228

260229
.. _whatsnew_0220.docs:
@@ -275,7 +244,7 @@ Bug Fixes
275244
Conversion
276245
^^^^^^^^^^
277246

278-
- Bug in :class:`Index` constructor with `dtype='uint64'` where int-like floats were not coerced to :class:`UInt64Index` (:issue:`18400`)
247+
- Bug in :class:`Index` constructor with ``dtype='uint64'`` where int-like floats were not coerced to :class:`UInt64Index` (:issue:`18400`)
279248
- Bug in the :class:`DataFrame` constructor in which data containing very large positive or very large negative numbers was causing ``OverflowError`` (:issue:`18584`)
280249
- Fixed a bug where creating a Series from an array that contains both tz-naive and tz-aware values will result in a Series whose dtype is tz-aware instead of object (:issue:`16406`)
281250
- Adding a ``Period`` object to a ``datetime`` or ``Timestamp`` object will now correctly raise a ``TypeError`` (:issue:`17983`)
@@ -287,11 +256,11 @@ Indexing
287256

288257
- Bug in :func:`Series.truncate` which raises ``TypeError`` with a monotonic ``PeriodIndex`` (:issue:`17717`)
289258
- Bug in :func:`DataFrame.groupby` where tuples were interpreted as lists of keys rather than as keys (:issue:`17979`, :issue:`18249`)
290-
- Bug in :func:`MultiIndex.remove_unused_levels`` which would fill nan values (:issue:`18417`)
259+
- Bug in :func:`MultiIndex.remove_unused_levels` which would fill nan values (:issue:`18417`)
291260
- Bug in :func:`MultiIndex.from_tuples`` which would fail to take zipped tuples in python3 (:issue:`18434`)
292-
- Bug in :class:`Index`` construction from list of mixed type tuples (:issue:`18505`)
261+
- Bug in :class:`Index` construction from list of mixed type tuples (:issue:`18505`)
293262
- Bug in :class:`IntervalIndex` where empty and purely NA data was constructed inconsistently depending on the construction method (:issue:`18421`)
294-
- Bug in ``IntervalIndex.symmetric_difference()`` where the symmetric difference with a non-``IntervalIndex`` did not raise (:issue:`18475`)
263+
- Bug in :func:`IntervalIndex.symmetric_difference` where the symmetric difference with a non-``IntervalIndex`` did not raise (:issue:`18475`)
295264
- Bug in indexing a datetimelike ``Index`` that raised ``ValueError`` instead of ``IndexError`` (:issue:`18386`).
296265

297266

@@ -351,5 +320,5 @@ Categorical
351320
Other
352321
^^^^^
353322

354-
- Improved error message when attempting to use a Python keyword as an identifier in a numexpr query (:issue:`18221`)
323+
- Improved error message when attempting to use a Python keyword as an identifier in a ``numexpr`` backed query (:issue:`18221`)
355324
-

0 commit comments

Comments
 (0)