【发布时间】:2021-06-23 12:45:18
【问题描述】:
我有一个新闻文章的熊猫数据框。假设
| id | news title | keywords | publcation date | content |
|---|---|---|---|---|
| 1 | Congress Wants to Beef Up Army Effort to Develop Counter-Drone Weapons | USA,Congress,Drone,Army | 2020-12-10 | SOME NEWS CONTENT |
| 2 | Israel conflict: The range and scale of Hamas' weapons ... | Israel,Hamas,Conflict | 2020-12-10 | NEWS CONTENT |
| 3 | US Air Force progresses testing of anti-drone laser weapons | USA,Air Force,Weapon,Dron | 2020-10-10 | NEWS CONTENT |
| 4 | Hamas fighters display weapons in Gaza after truce with Israel | Hamas,Gaza,Israel,Weapon,Truce | 2020-11-10 | NEWS CONTENT |
现在
如何根据新闻内容对相似数据进行分组并按发布日期排序
注意:内容可能是新闻摘要
使其显示为:
组 1
| id | news title | keywords | publcation date | content |
|---|---|---|---|---|
| 3 | US Air Force progresses testing of anti-drone laser weapons | USA,Air Force,Weapon,Dron | 2020-10-10 | NEWS CONTENT |
| 1 | Congress Wants to Beef Up Army Effort to Develop Counter-Drone Weapons | USA,Congress,Drone,Army | 2020-12-10 | SOME NEWS CONTENT |
组 2
| id | news title | keywords | publcation date | content |
|---|---|---|---|---|
| 4 | Hamas fighters display weapons in Gaza after truce with Israel | Hamas,Gaza,Israel,Weapon,Truce | 2020-11-10 | NEWS CONTENT |
| 2 | Israel conflict: The range and scale of Hamas' weapons ... | Israel,Hamas,Conflict | 2020-12-10 | NEWS CONTENT |
【问题讨论】:
标签: python-3.x pandas dataframe nlp similarity