【发布时间】:2021-10-24 01:25:41
【问题描述】:
我正在尝试找出唯一的单词数量以及它们重复了多少次。
尝试用python编写代码。
输入数据集:
| Movie | genre |
|---|---|
| movie 1 | Action/Animation/Sci-Fi |
| movie 2 | Adventure/Animation/Drama/Mystery/Sci-Fi |
输出数据集:
| Genre | count |
|---|---|
| Sci-Fi | 2 |
| Animation | 2 |
| Action | 1 |
| Adventure | 1 |
| Drama | 1 |
| Mystery | 1 |
【问题讨论】:
标签: python pandas dataframe counter frequency