You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.22.0.txt
+11-42
Original file line number
Diff line number
Diff line change
@@ -72,16 +72,7 @@ In previous version, ``inf`` elements were assigned ``NaN`` as their ranks. Now
72
72
73
73
.. ipython:: python
74
74
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])
85
76
86
77
Previous Behavior:
87
78
@@ -100,28 +91,13 @@ Current Behavior
100
91
101
92
.. ipython:: python
102
93
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()
111
95
112
96
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.
113
97
114
98
.. ipython:: python
115
99
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])
125
101
126
102
Previous Behavior:
127
103
@@ -139,14 +115,7 @@ Current Behavior
139
115
140
116
.. ipython:: python
141
117
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')
150
119
151
120
.. _whatsnew_0220.enhancements.other:
152
121
@@ -222,7 +191,7 @@ Deprecations
222
191
223
192
- ``Series.from_array`` and ``SparseSeries.from_array`` are deprecated. Use the normal constructor ``Series(..)`` and ``SparseSeries(..)`` instead (:issue:`18213`).
224
193
- ``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`)
226
195
227
196
.. _whatsnew_0220.prior_deprecations:
228
197
@@ -254,7 +223,7 @@ Performance Improvements
254
223
- The overriden ``Timedelta`` properties of days, seconds and microseconds have been removed, leveraging their built-in Python versions instead (:issue:`18242`)
255
224
- ``Series`` construction will reduce the number of copies made of the input data in certain cases (:issue:`17449`)
256
225
- 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`)
258
227
- Improved performance of ``DatetimeIndex`` and ``Series`` arithmetic operations with Business-Month and Business-Quarter frequencies (:issue:`18489`)
259
228
260
229
.. _whatsnew_0220.docs:
@@ -275,7 +244,7 @@ Bug Fixes
275
244
Conversion
276
245
^^^^^^^^^^
277
246
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`)
279
248
- Bug in the :class:`DataFrame` constructor in which data containing very large positive or very large negative numbers was causing ``OverflowError`` (:issue:`18584`)
280
249
- 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`)
281
250
- Adding a ``Period`` object to a ``datetime`` or ``Timestamp`` object will now correctly raise a ``TypeError`` (:issue:`17983`)
@@ -287,11 +256,11 @@ Indexing
287
256
288
257
- Bug in :func:`Series.truncate` which raises ``TypeError`` with a monotonic ``PeriodIndex`` (:issue:`17717`)
289
258
- 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`)
291
260
- 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`)
293
262
- 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`)
295
264
- Bug in indexing a datetimelike ``Index`` that raised ``ValueError`` instead of ``IndexError`` (:issue:`18386`).
296
265
297
266
@@ -351,5 +320,5 @@ Categorical
351
320
Other
352
321
^^^^^
353
322
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`)
0 commit comments