Book Image

Hands-On Recommendation Systems with Python

By : Rounak Banik
Book Image

Hands-On Recommendation Systems with Python

By: Rounak Banik

Overview of this book

Recommendation systems are at the heart of almost every internet business today; from Facebook to Net?ix to Amazon. Providing good recommendations, whether it's friends, movies, or groceries, goes a long way in defining user experience and enticing your customers to use your platform. This book shows you how to do just that. You will learn about the different kinds of recommenders used in the industry and see how to build them from scratch using Python. No need to wade through tons of machine learning theory—you'll get started with building and learning about recommenders as quickly as possible.. In this book, you will build an IMDB Top 250 clone, a content-based engine that works on movie metadata. You'll use collaborative filters to make use of customer behavior data, and a Hybrid Recommender that incorporates content based and collaborative filtering techniques  With this book, all you need to get started with building recommendation systems is a familiarity with Python, and by the time you're fnished, you will have a great grasp of how recommenders work and be in a strong position to apply the techniques that you will learn to your own problem domains.
Table of Contents (9 chapters)

The Pandas Series

When we accessed the Jumanji movie using .loc and .iloc, the data structures returned to us were Pandas Series objects. You may have also noticed that we were accessing entire columns using df[column_name]. This, too, was a Pandas Series object:

type(small_df['year'])

OUTPUT:
pandas.core.series.Series

The Pandas Series is a one-dimensional labelled array capable of holding data of any type. You may think of it as a Python list on steroids. When we were using the .apply() and .astype() methods in the previous section, we were actually using them on these Series objects.

Therefore, like the DataFrame, the Series object comes with its own group of extremely useful methods that make data analysis a breeze.

First, let's check out the shortest- and longest-running movies of all time. We will do this by accessing the runtime column of the DataFrame as...