【发布时间】:2019-05-17 17:25:31
【问题描述】:
我有以下 df,包含来自不同来源的每日文章:
print(df)
Date content
2018-11-01 Apple Inc. AAPL 1.54% reported its fourth cons...
2018-11-01 U.S. stocks climbed Thursday, Apple is a real ...
2018-11-02 GONE are the days when smartphone manufacturer...
2018-11-03 To historians of technology, the story of the ...
2018-11-03 Apple Inc. AAPL 1.54% reported its fourth cons...
2018-11-03 Apple is turning to traditional broadcasting t...
(...)
我想计算“Apple”一词的每日提及次数(因此按日期汇总)的总数。如何创建“final_df”?
print(final_df)
2018-11-01 2
2018-11-02 0
2018-11-03 2
(...)
【问题讨论】:
标签: python pandas nlp word-count