jacobkap / fastDummies

The goal of fastDummies is to quickly create dummy variables (columns) and dummy rows.
https://jacobkap.github.io/fastDummies/
Other
36 stars 9 forks source link

sort_columns = TRUE does not work #17

Closed mlamias closed 5 years ago

mlamias commented 5 years ago

I just pulled both the current production version and dev version of fastDummies and neither one currently has sort_columns = TRUE working correctly. For example, if I use this option in your example, I get the following:

> dummy_cols(fastDummies_example, sort_columns = TRUE)
  numbers gender animals      dates gender_ animals_
1       1   male     dog 2012-01-01       0        0
2       2   male     dog 2011-12-31       0        0
3       3 female     cat 2012-01-01       0        0

Can this be fixed?

Thanks. I love this package!

jacobkap commented 5 years ago

In the new dev version I have removed this parameter and made it the default way of handling factor variables.