Skip to content

Commit 755886c

Browse files
committed
DOC: minor change in whatsnew
1 parent a7469cf commit 755886c

File tree

1 file changed

+26
-25
lines changed

1 file changed

+26
-25
lines changed

doc/source/whatsnew/v0.19.0.txt

+26-25
Original file line numberDiff line numberDiff line change
@@ -291,27 +291,27 @@ Categorical Concatenation
291291

292292
.. ipython:: python
293293

294-
from pandas.types.concat import union_categoricals
295-
a = pd.Categorical(["b", "c"])
296-
b = pd.Categorical(["a", "b"])
297-
union_categoricals([a, b])
294+
from pandas.types.concat import union_categoricals
295+
a = pd.Categorical(["b", "c"])
296+
b = pd.Categorical(["a", "b"])
297+
union_categoricals([a, b])
298298

299299
- ``concat`` and ``append`` now can concat ``category`` dtypes with different ``categories`` as ``object`` dtype (:issue:`13524`)
300300

301301
**Previous behavior**:
302302

303-
.. code-block:: ipython
303+
.. code-block:: ipython
304304

305-
In [1]: s1 = pd.Series(['a', 'b'], dtype='category')
306-
In [2]: s2 = pd.Series(['b', 'c'], dtype='category')
307-
In [3]: pd.concat([s1, s2])
308-
ValueError: incompatible categories in categorical concat
305+
In [1]: s1 = pd.Series(['a', 'b'], dtype='category')
306+
In [2]: s2 = pd.Series(['b', 'c'], dtype='category')
307+
In [3]: pd.concat([s1, s2])
308+
ValueError: incompatible categories in categorical concat
309309

310310
**New behavior**:
311311

312-
.. ipython:: python
312+
.. ipython:: python
313313

314-
pd.concat([s1, s2])
314+
pd.concat([s1, s2])
315315

316316
.. _whatsnew_0190.enhancements.semi_month_offsets:
317317

@@ -326,15 +326,15 @@ These provide date offsets anchored (by default) to the 15th and end of month, a
326326

327327
from pandas.tseries.offsets import SemiMonthEnd, SemiMonthBegin
328328

329-
SemiMonthEnd:
329+
**SemiMonthEnd**:
330330

331331
.. ipython:: python
332332

333333
Timestamp('2016-01-01') + SemiMonthEnd()
334334

335335
pd.date_range('2015-01-01', freq='SM', periods=4)
336336

337-
SemiMonthBegin:
337+
**SemiMonthBegin**:
338338

339339
.. ipython:: python
340340

@@ -441,11 +441,11 @@ Downcast values to smallest possible dtype in ``to_numeric``
441441

442442
``pd.to_numeric()`` now accepts a ``downcast`` parameter, which will downcast the data if possible to smallest specified numerical dtype (:issue:`13352`)
443443

444-
.. ipython:: python
444+
.. ipython:: python
445445

446-
s = ['1', 2, 3]
447-
pd.to_numeric(s, downcast='unsigned')
448-
pd.to_numeric(s, downcast='integer')
446+
s = ['1', 2, 3]
447+
pd.to_numeric(s, downcast='unsigned')
448+
pd.to_numeric(s, downcast='integer')
449449

450450

451451
.. _whatsnew_0190.enhancements.other:
@@ -583,7 +583,7 @@ Comparison operators
583583

584584
Comparison operators raise ``ValueError`` when ``.index`` are different.
585585

586-
Previous Behavior (``Series``):
586+
**Previous Behavior** (``Series``):
587587

588588
``Series`` compared values ignoring the ``.index`` as long as both had the same length:
589589

@@ -618,7 +618,7 @@ Previous Behavior (``Series``):
618618

619619
s1.eq(s2)
620620

621-
Current Behavior (``DataFrame``, no change):
621+
**Current Behavior** (``DataFrame``, no change):
622622

623623
.. code-block:: ipython
624624

@@ -631,7 +631,7 @@ Logical operators
631631

632632
Logical operators align both ``.index`` of left and right hand side.
633633

634-
Previous behavior (``Series``), only left hand side ``index`` was kept:
634+
**Previous behavior** (``Series``), only left hand side ``index`` was kept:
635635

636636
.. code-block:: ipython
637637

@@ -662,7 +662,7 @@ Previous behavior (``Series``), only left hand side ``index`` was kept:
662662

663663
s1 & s2.reindex_like(s1)
664664

665-
Current Behavior (``DataFrame``, no change):
665+
**Current Behavior** (``DataFrame``, no change):
666666

667667
.. ipython:: python
668668

@@ -729,6 +729,8 @@ Previously if ``.to_datetime()`` encountered mixed integers/floats and strings,
729729
In [2]: pd.to_datetime([1, 'foo'], errors='coerce')
730730
Out[2]: DatetimeIndex(['NaT', 'NaT'], dtype='datetime64[ns]', freq=None)
731731

732+
**Current behavior**:
733+
732734
This will now convert integers/floats with the default unit of ``ns``.
733735

734736
.. ipython:: python
@@ -972,18 +974,17 @@ Previous behavior:
972974
pd.Index(['a', 'b']) + pd.Index(['a', 'c'])
973975

974976
Note that numeric Index objects already performed element-wise operations.
975-
For example, the behavior of adding two integer Indexes:
977+
For example, the behavior of adding two integer Indexes is unchanged.
978+
The base ``Index`` is now made consistent with this behavior.
976979

977980
.. ipython:: python
978981

979982
pd.Index([1, 2, 3]) + pd.Index([2, 3, 4])
980983

981-
is unchanged. The base ``Index`` is now made consistent with this behavior.
982-
983984
Further, because of this change, it is now possible to subtract two
984985
DatetimeIndex objects resulting in a TimedeltaIndex:
985986

986-
Previous behavior:
987+
**Previous behavior**:
987988

988989
.. code-block:: ipython
989990

0 commit comments

Comments
 (0)