Get one column for each level in a categorical column
1 2 | ezr.get_dummies(dataset, dummy_this_col, return_as_seperate_df = FALSE,
drop_original_col = TRUE, convert_to_factor = TRUE)
|
dataset |
Dataframe |
dummy_this_col |
Should be a categorical value you want to one hot encode |
return_as_seperate_df |
Return the original or just the encoded values? |
drop_original_col |
Drop original column? Default is TRUE |
convert_to_factor |
Convert to factor? Default is TRUE. Keep at FALSE if you want to later calculate counts or percents of a given level. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.