String manipulation then applying dummy variables to them

后端 未结 1 743
感动是毒
感动是毒 2021-01-25 13:27

I am working on a small project to build a recommendation system. I have the movie\'s categories column and I would like to apply dummy variables on it.

#Here is         


        
相关标签:
1条回答
  • 2021-01-25 14:09

    Use Series.str.get_dummies:

    df_dummies = movie_data['Movie_Category'].str.get_dummies(',')
    
    0 讨论(0)
提交回复
热议问题