How to do Basic Pre-Processing of Twitter data:
1 min readOct 16, 2018
On extracting tweets from Twitter, it is important to pre-process data/tweets so that one is able to obtain data that one can work with for analysis.
This is where something called as Regular Expressions play a vital role.
Step 1: Import Regular Expression Package
Step 2: Pre-processing Data
Let us assume that the Twitter Data/Text is stored in a list called ‘messages’
‘new_tweet’ is a list which contains cleaned text based on the commands executed above.
There is so much more one can do with Regular Expressions based on the requirements necessary for analysis.