首页 > 解决方案 > 获取具有多个变量的列的假人

问题描述

所以我正在使用一个数据框,它有一个列,其中基本上列出了适用于电影的所有类型,如下所示:

                                             Genres
0       Action, Adventure, Fantasy, Science Fiction
1                        Adventure, Fantasy, Action
2                          Action, Adventure, Crime
3                    Action, Crime, Drama, Thriller
4                Action, Adventure, Science Fiction
                           ...                     
4798                        Action, Crime, Thriller
4799                                Comedy, Romance
4800               Comedy, Drama, Romance, TV Movie
4801                                               
4802                                    Documentary

基本上我想为这些类型创建假人,但是当应用几个分类变量时我很难做到这一点,有什么办法可以做到这一点吗?谢谢!

标签: pythonpandas

解决方案


推荐阅读