bach.SeriesString.get_dummies

get_dummies

(prefix=None, prefix_sep='_', dummy_na=False, dtype='int64')

[source]

Convert each unique category/value from the series into a dummy/indicator variable.

Parameters

  • prefix (Optional[str]) – String to append to each new column name. By default, the prefix will be the name of the caller.
  • prefix_sep (str) – Separated between the prefix and label.
  • dummy_na (bool) – If true, it will include nan as a variable.
  • dtype (str) – dtype of all new columns

Returns

DataFrame

Return type

DataFrame

note

Series should contain at least one index level.