30 Rock Analysis

TLDR: Some basic expoloritory analysis with 30 Rock Data. Introduction In this post we will explore some 30 Rock data. The data includes imdb ratings, viewership numbers, and writers of the episodes. We will take a step by step approach to creating plots for ratings and viewership over time. Libraries For this analysis we will be using the below Python libraries. Pandas for working with data frames matplotlib.pyplot for creating plots and adjusting features matplotlib.mdates for working with date formatting import pandas as pd import matplotlib.pyplot as plt import matplotlib.dates as mdates Create Data Frames The dataset from kaggle came in two csv files. The initial step is to read the csv files into pandas dataframes using the .read_csv method. It is important to know what type of data the dataframes contain. Using pandas’ .dtypes property shows the column name and what data type the values are. Comparing the results between the two data frames, it is clear that there is some overlap in the data. Both data frames have columns that hold values for season, episodes, title, and airdates. This information is important when the data frames are merged together. Another interesting thing that is shown by viewing the data types is that the column original_air_data is showing as on object; it might be more helpful for it to be a datetime data type. ...

April 17, 2024 · 9 min