pandas.core.series.Series - The Column Class

This section describes pandas.core.series.Series class, which represents a column of data.

What Is pandas.core.frame.Series? pandas.core.frame.Series is a class that represents a column of data.

Main features of pandas.DataFrame are:

Here are some basic properties, operations and methods provided in pandas.core.frame.Series class.

1. df[col_name] - Method to extract a given column from a DataFrame as a Series.

>>> import pandas as pd

df = pd.DataFrame({
  "Name": [
    "Braund, Mr. Owen Harris",
    "Allen, Mr. William Henry",
    "Bonnell, Miss. Elizabeth",
  "Age": [22, 35, 58],
  "Sex": ["male", "male", "female"],

>>> ser = df["Name"]
>>> type(ser)

>>> print(ser)
0     Braund, Mr. Owen Harris
1    Allen, Mr. William Henry
2    Bonnell, Miss. Elizabeth
Name: Name, dtype: object

2. ser.unique() - Method to return unique values as a Series.

Table of Contents

 About This Book

 Running Python Code Online

 Python on macOS Computers

 Python on Linux Computers

 Built-in Data Types

 Variables, Operations and Expressions

 Statements - Execution Units

 Function Statement and Function Call

 Iterators, Generators and List Comprehensions

 Classes and Instances

 Modules and Module Files

 Packages and Package Directories

 "sys" and "os" Modules

 "pathlib" - Object-Oriented Filesystem Paths

 "pip" - Package Installer for Python - Python Libraries for Science

pandas - Data Analysis and Manipulation

 What Is 'pandas'

 pandas.DataFrame/pandas.core.frame.DataFrame - The Table Class

pandas.core.series.Series - The Column Class

 File Input and Output for DataFrame

 Anaconda - Python Environment Manager

 Jupyter Notebook and JupyterLab


 Full Version in PDF/EPUB