Reader small image

You're reading from  Hands-On Recommendation Systems with Python

Product typeBook
Published inJul 2018
Reading LevelExpert
PublisherPackt
ISBN-139781788993753
Edition1st Edition
Languages
Right arrow
Author (1)
Rounak Banik
Rounak Banik
author image
Rounak Banik

Rounak Banik is a Young India Fellow and an ECE graduate from IIT Roorkee. He has worked as a software engineer at Parceed, a New York start-up, and Springboard, an EdTech start-up based in San Francisco and Bangalore. He has also served as a backend development instructor at Acadview, teaching Python and Django to around 35 college students from Delhi and Dehradun. He is an alumni of Springboard's data science career track. He has given talks at the SciPy India Conference and published popular tutorials on Kaggle and DataCamp.
Read more about Rounak Banik

Right arrow

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...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Recommendation Systems with Python
Published in: Jul 2018Publisher: PacktISBN-13: 9781788993753

Author (1)

author image
Rounak Banik

Rounak Banik is a Young India Fellow and an ECE graduate from IIT Roorkee. He has worked as a software engineer at Parceed, a New York start-up, and Springboard, an EdTech start-up based in San Francisco and Bangalore. He has also served as a backend development instructor at Acadview, teaching Python and Django to around 35 college students from Delhi and Dehradun. He is an alumni of Springboard's data science career track. He has given talks at the SciPy India Conference and published popular tutorials on Kaggle and DataCamp.
Read more about Rounak Banik