Skip to content

Commit 5ade2b4

Browse files
Fix prefix type hint
1 parent 9a33fec commit 5ade2b4

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

pandas/core/strings/accessor.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,8 +2366,8 @@ def wrap(
23662366
def get_dummies(
23672367
self,
23682368
sep: str = "|",
2369-
prefix=None,
2370-
prefix_sep: str | Iterable[str] | dict[str, str] | None = "_",
2369+
prefix: str | Iterable[str] | dict[str, str] | None = None,
2370+
prefix_sep: str | None = "_",
23712371
dummy_na: bool = False,
23722372
sparse: bool = False,
23732373
dtype: NpDtype | None = int,
@@ -2382,6 +2382,21 @@ def get_dummies(
23822382
----------
23832383
sep : str, default "|"
23842384
String to split on.
2385+
prefix : str, list of str, or dict of str, default None
2386+
String to append DataFrame column names.
2387+
Pass a list with length equal to the number of columns
2388+
when calling get_dummies on a DataFrame. Alternatively, `prefix`
2389+
can be a dictionary mapping column names to prefixes.
2390+
prefix_sep : str, default '_'
2391+
If appending prefix, separator/delimiter to use. Or pass a
2392+
list or dictionary as with `prefix`.
2393+
dummy_na : bool, default False
2394+
Add a column to indicate NaNs, if False NaNs are ignored.
2395+
sparse : bool, default False
2396+
Whether the dummy-encoded columns should be backed by
2397+
a :class:`SparseArray` (True) or a regular NumPy array (False).
2398+
dtype : dtype, default bool
2399+
Data type for new columns. Only a single dtype is allowed.
23852400
23862401
Returns
23872402
-------

0 commit comments

Comments
 (0)