O'Reilly logo

Python Social Media Analytics by Michal Krystyanczuk, Siddhartha Chatterjee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data cleaning

Our goal is to prepare the data in the format which is most appropriate for analysis. It means we need to clean up unnecessary fields and focus only on the relevant parts.

We would like to analyze the sentiments of the tweets that are written by people from their different devices. Therefore, we should get rid of the tweets composed by bots, web pages, automated posting services, and so on. We cannot identify those tweets 100%, but quite a good assumption would be to select tweets posted from physical devices, meaning iPhones, Android phones, desktops, and laptops.

Twitter documents have an interesting feature, because they keep the information about the source of the tweet creation. Whenever someone uses a device to compose ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required