Skip to content

Commit d87061d

Browse files
jrebackNo-Stream
authored andcommitted
DOC: whatsnew fixes (pandas-dev#17626)
closes pandas-dev#17601
1 parent aa8a897 commit d87061d

File tree

1 file changed

+57
-54
lines changed

1 file changed

+57
-54
lines changed

doc/source/whatsnew/v0.21.0.txt

+57-54
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ We have updated our minimum supported versions of dependencies (:issue:`15206`,
135135

136136
+--------------+-----------------+----------+
137137
| Package | Minimum Version | Required |
138-
+======================+=========+==========+
138+
+==============+=================+==========+
139139
| Numpy | 1.9.0 | X |
140140
+--------------+-----------------+----------+
141141
| Matplotlib | 1.4.3 | |
@@ -241,54 +241,53 @@ New Behaviour:
241241
Dtype Conversions
242242
^^^^^^^^^^^^^^^^^
243243

244-
- Previously assignments, ``.where()`` and ``.fillna()`` with a ``bool`` assignment, would coerce to
245-
same the type (e.g. int / float), or raise for datetimelikes. These will now preseve the bools with ``object`` dtypes. (:issue:`16821`).
244+
Previously assignments, ``.where()`` and ``.fillna()`` with a ``bool`` assignment, would coerce to same the type (e.g. int / float), or raise for datetimelikes. These will now preseve the bools with ``object`` dtypes. (:issue:`16821`).
246245

247-
.. ipython:: python
246+
.. ipython:: python
248247

249-
s = Series([1, 2, 3])
248+
s = Series([1, 2, 3])
250249

251-
.. code-block:: python
250+
.. code-block:: python
252251

253-
In [5]: s[1] = True
252+
In [5]: s[1] = True
254253

255-
In [6]: s
256-
Out[6]:
257-
0 1
258-
1 1
259-
2 3
260-
dtype: int64
254+
In [6]: s
255+
Out[6]:
256+
0 1
257+
1 1
258+
2 3
259+
dtype: int64
261260

262-
New Behavior
261+
New Behavior
263262

264-
.. ipython:: python
263+
.. ipython:: python
265264

266-
s[1] = True
267-
s
265+
s[1] = True
266+
s
268267

269-
- Previously, as assignment to a datetimelike with a non-datetimelike would coerce the
270-
non-datetime-like item being assigned (:issue:`14145`).
268+
Previously, as assignment to a datetimelike with a non-datetimelike would coerce the
269+
non-datetime-like item being assigned (:issue:`14145`).
271270

272-
.. ipython:: python
271+
.. ipython:: python
273272

274-
s = pd.Series([pd.Timestamp('2011-01-01'), pd.Timestamp('2012-01-01')])
273+
s = pd.Series([pd.Timestamp('2011-01-01'), pd.Timestamp('2012-01-01')])
275274

276-
.. code-block:: python
275+
.. code-block:: python
277276

278-
In [1]: s[1] = 1
277+
In [1]: s[1] = 1
279278

280-
In [2]: s
281-
Out[2]:
282-
0 2011-01-01 00:00:00.000000000
283-
1 1970-01-01 00:00:00.000000001
284-
dtype: datetime64[ns]
279+
In [2]: s
280+
Out[2]:
281+
0 2011-01-01 00:00:00.000000000
282+
1 1970-01-01 00:00:00.000000001
283+
dtype: datetime64[ns]
285284

286-
These now coerce to ``object`` dtype.
285+
These now coerce to ``object`` dtype.
287286

288-
.. ipython:: python
287+
.. ipython:: python
289288

290-
s[1] = 1
291-
s
289+
s[1] = 1
290+
s
292291

293292
- Inconsistent behavior in ``.where()`` with datetimelikes which would raise rather than coerce to ``object`` (:issue:`16402`)
294293
- Bug in assignment against ``int64`` data with ``np.ndarray`` with ``float64`` dtype may keep ``int64`` dtype (:issue:`14001`)
@@ -338,26 +337,26 @@ UTC Localization with Series
338337

339338
Previously, :func:`to_datetime` did not localize datetime ``Series`` data when ``utc=True`` was passed. Now, :func:`to_datetime` will correctly localize ``Series`` with a ``datetime64[ns, UTC]`` dtype to be consistent with how list-like and ``Index`` data are handled. (:issue:`6415`).
340339

341-
Previous Behavior
340+
Previous Behavior
342341

343-
.. ipython:: python
342+
.. ipython:: python
344343

345-
s = Series(['20130101 00:00:00'] * 3)
344+
s = Series(['20130101 00:00:00'] * 3)
346345

347-
.. code-block:: ipython
346+
.. code-block:: ipython
348347

349-
In [12]: pd.to_datetime(s, utc=True)
350-
Out[12]:
351-
0 2013-01-01
352-
1 2013-01-01
353-
2 2013-01-01
354-
dtype: datetime64[ns]
348+
In [12]: pd.to_datetime(s, utc=True)
349+
Out[12]:
350+
0 2013-01-01
351+
1 2013-01-01
352+
2 2013-01-01
353+
dtype: datetime64[ns]
355354

356-
New Behavior
355+
New Behavior
357356

358-
.. ipython:: python
357+
.. ipython:: python
359358

360-
pd.to_datetime(s, utc=True)
359+
pd.to_datetime(s, utc=True)
361360

362361
Additionally, DataFrames with datetime columns that were parsed by :func:`read_sql_table` and :func:`read_sql_query` will also be localized to UTC only if the original SQL columns were timezone aware datetime columns.
363362

@@ -410,9 +409,9 @@ Previous Behavior:
410409

411410
New Behavior:
412411

413-
.. ipython:: python
412+
.. ipython:: python
414413

415-
pd.interval_range(start=0, end=4)
414+
pd.interval_range(start=0, end=4)
416415

417416
.. _whatsnew_0210.api:
418417

@@ -476,6 +475,14 @@ Performance Improvements
476475
- Improved performance of the :class:`CategoricalIndex` for data that is already categorical dtype (:issue:`17513`)
477476
- Improved performance of :meth:`RangeIndex.min` and :meth:`RangeIndex.max` by using ``RangeIndex`` properties to perform the computations (:issue:`17607`)
478477

478+
.. _whatsnew_0210.docs:
479+
480+
Documentation Changes
481+
~~~~~~~~~~~~~~~~~~~~~
482+
483+
- Several ``NaT`` method docstrings (e.g. :func:`NaT.ctime`) were incorrect (:issue:`17327`)
484+
- The documentation has had references to versions < v0.17 removed and cleaned up (:issue:`17442`, :issue:`17442`, :issue:`17404` & :issue:`17504`)
485+
479486
.. _whatsnew_0210.bug_fixes:
480487

481488
Bug Fixes
@@ -530,7 +537,7 @@ Plotting
530537
^^^^^^^^
531538
- Bug in plotting methods using ``secondary_y`` and ``fontsize`` not setting secondary axis font size (:issue:`12565`)
532539
- Bug when plotting ``timedelta`` and ``datetime`` dtypes on y-axis (:issue:`16953`)
533-
- Line plots no longer assume monotonic x data when calculating xlims, they show the entire lines now even for unsorted x data. (:issue:`11310`)(:issue:`11471`)
540+
- Line plots no longer assume monotonic x data when calculating xlims, they show the entire lines now even for unsorted x data. (:issue:`11310`, :issue:`11471`)
534541
- With matplotlib 2.0.0 and above, calculation of x limits for line plots is left to matplotlib, so that its new default settings are applied. (:issue:`15495`)
535542
- Bug in ``Series.plot.bar`` or ``DataFramee.plot.bar`` with ``y`` not respecting user-passed ``color`` (:issue:`16822`)
536543

@@ -575,10 +582,8 @@ Numeric
575582
Categorical
576583
^^^^^^^^^^^
577584
- Bug in :func:`Series.isin` when called with a categorical (:issue`16639`)
578-
- Bug in the categorical constructor with empty values and categories causing
579-
the ``.categories`` to be an empty ``Float64Index`` rather than an empty
580-
``Index`` with object dtype (:issue:`17248`)
581-
- Bug in categorical operations with :ref:`Series.cat <categorical.cat>' not preserving the original Series' name (:issue:`17509`)
585+
- Bug in the categorical constructor with empty values and categories causing the ``.categories`` to be an empty ``Float64Index`` rather than an empty ``Index`` with object dtype (:issue:`17248`)
586+
- Bug in categorical operations with :ref:`Series.cat <categorical.cat>' not preserving the original Series' name (:issue:`17509`)
582587

583588
PyPy
584589
^^^^
@@ -593,5 +598,3 @@ PyPy
593598
Other
594599
^^^^^
595600
- Bug in :func:`eval` where the ``inplace`` parameter was being incorrectly handled (:issue:`16732`)
596-
- Several ``NaT`` method docstrings (e.g. :func:`NaT.ctime`) were incorrect (:issue:`17327`)
597-
- The documentation has had references to versions < v0.17 removed and cleaned up (:issue:`17442`, :issue:`17442`, :issue:`17404` & :issue:`17504`)

0 commit comments

Comments
 (0)