I’m struggling with this data over weeks.
my current data is;
book
1
3
5
4
5
2
2
1
But I want to change as;
1 2 3 4 5 <- this should be the name of columns
1 0 0 0 0
0 0 1 0 0
0 0 0 0 1
I used one hot encoding and dummy variables and it wasn’t working
I tried to use dummyVar function, but i don’t know how to divded as numbers. The only answer that I found was how to separate with words ex)”species” “gender”.
All of them are not working.
I’m not sure I can split my continuous data with one hot encoding and dummy variables.
any Idea?? Thank you sooooo much 😉
Eunseo Park is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.