Created
February 6, 2021 01:50
-
-
Save john-adeojo/b970942866131c1b450d21133774fbee to your computer and use it in GitHub Desktop.
Dataframe that feeds transformer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def mergetopics(docs_per_topic, topic_sizes): | |
| # Bring it all together to get a summary of topics, all text bodies within the topic and top size. | |
| docs_per_topic["Topic_words"] = docs_per_topic.Topic.map(top_n_words) | |
| reddit_topics = pd.merge(docs_per_topic, topic_sizes, how="left", on="Topic") | |
| return reddit_topics |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment