Skip to content

Commit d19d81f

Browse files
committed
DOC: update whatsnew style, minore codestyle change
1 parent bc192fd commit d19d81f

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

doc/source/whatsnew/v0.22.0.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ New features
2323
``get_dummies`` now supports ``dtype`` argument
2424
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2525

26-
The :func:`get_dummies` now accepts a ``dtype`` argument, which specifies a specific dtype for the new columns. When ``dtype`` is not specified or ``None``, the dtype will be ``uint8`` as before. (:issue:`18330`)
26+
The :func:`get_dummies` now accepts a ``dtype`` argument, which specifies a dtype for the new columns. The default remains uint8. (:issue:`18330`)
2727

2828
.. ipython:: python
2929

pandas/core/reshape/reshape.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,7 @@ def _get_dummies_1d(data, prefix, prefix_sep='_', dummy_na=False,
864864

865865
if dtype is None:
866866
dtype = np.uint8
867-
else:
868-
dtype = np.dtype(dtype)
867+
dtype = np.dtype(dtype)
869868

870869
if is_object_dtype(dtype):
871870
raise ValueError("dtype=object is not a valid dtype for get_dummies")

0 commit comments

Comments
 (0)