Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Recommendation Systems with Python

You're reading from   Hands-On Recommendation Systems with Python Start building powerful and personalized, recommendation engines with Python

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781788993753
Length 146 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Rounak Banik Rounak Banik
Author Profile Icon Rounak Banik
Rounak Banik
Arrow right icon
View More author details
Toc

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime