File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ def get_dummies(
3535 """
3636 Convert categorical variable into dummy/indicator variables.
3737
38+ Each variable is converted in as many 0/1 variables as there are different
39+ values. Columns in the output are each named after a value; if the input is
40+ a DataFrame, the name of the original variable is prepended to the value.
41+
3842 Parameters
3943 ----------
4044 data : array-like, Series, or DataFrame
@@ -65,11 +69,12 @@ def get_dummies(
6569 Returns
6670 -------
6771 DataFrame
68- Dummy-coded data.
72+ Dummy-coded data. If `data` contains other columns than the
73+ dummy-coded one(s), these will be prepended, unaltered, to the result.
6974
7075 See Also
7176 --------
72- Series.str.get_dummies : Convert Series to dummy codes.
77+ Series.str.get_dummies : Convert Series of strings to dummy codes.
7378 :func:`~pandas.from_dummies` : Convert dummy codes to categorical ``DataFrame``.
7479
7580 Notes
You can’t perform that action at this time.
0 commit comments