I was looking for how to unload the obtained data into a .txt or csv file, but I could not find a simple and understandable solution with my level of understanding of this process.
I need to sort words by frequency and highlight the top 100 words. I did it (I know not in the best way, I did everything in the Google collaboratori)
from collections import Counter
Counter(" ".join(test_data['body']).split()).most_common(100)
DATA= Counter(" ".join(test_data['body']).split()).most_common(100)
DATA
Question:
how to save the result from these top 100 words to a text file .csv or .txt, and possibly an Excel version.(or in three versions at once)
I'm just learning and don't know a lot, trying to figure it out and understand.
Here is a link to the collab, for me the problem is that the words are Russian, and all the practices are for English texts, and it's easier than working with Russian text. https://colab.research.google.com/drive/1LZ3RHPTjTib8lUjzKGcCJgzYnODSjewL?usp=sharing