Skip to content

Commit 15f6818

Browse files
MarcoGorelliMarco Gorelli
authored and
Marco Gorelli
committed
fix docstring
1 parent 3bfafe6 commit 15f6818

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pandas/core/reshape/reshape.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -751,26 +751,28 @@ def _convert_level_number(level_num, columns):
751751
return result
752752

753753

754-
def from_dummies(data, prefix=None, prefix_sep="_", dtype="category", fill_first=None):
754+
def from_dummies(data, prefix=None, prefix_sep="_", dtype="category", fill_first=None) -> "DataFrame":
755755
"""
756756
The inverse transformation of ``pandas.get_dummies``.
757757
758758
Parameters
759759
----------
760760
data : DataFrame
761+
Data which contains dummy indicators.
761762
prefix : list-like, default None
762763
Prefixes of the columns in the DataFrame to be decoded.
763764
If `prefix` is None then all the columns will be decoded.
764765
prefix_sep : str, default '_'
765-
Separator between original column name and dummy variable
766+
Separator between original column name and dummy variable.
766767
dtype : dtype, default 'category'
767-
Data dtype for new columns - only a single data type is allowed
768+
Data dtype for new columns - only a single data type is allowed.
768769
fill_first : str, list, or dict, default None
769-
Used to fill rows for which all the dummy variables are 0
770+
Used to fill rows for which all the dummy variables are 0.
770771
771772
Returns
772773
-------
773-
transformed : DataFrame
774+
DataFrame
775+
Decoded data.
774776
775777
Examples
776778
--------

0 commit comments

Comments
 (0)