Path: blob/master/Lecture_2.ipynb
145 views
The Sakila Database
One of the best example databases out there is the Sakila Database, which was originally created by MySQL and has been open sourced under the terms of the BSD License.
The Sakila database is a nicely normalised schema modelling a DVD rental store, featuring things like films, actors, film-actor relationships, and a central inventory table that connects films, stores, and rentals.
Hands on!
Loading our data:
The data at a glance:
Numerical analysis and visualization
We'll analyze the film_rental_rate
column:
Categorical analysis and visualization
We'll analyze the rental_store_city
column:
Column wrangling
We can also create new columns or modify existing ones.
Add and calculate a new rental_rate_return
column
We want to know the rental rate of return of each film. To do that we'll use this formula:
Each rental represents 13.6% of film cost.
So 7.35 rentals are needed to recover film market price (film_replacement_cost
)
While in average each film is rented 16.74 times.