Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Series | The Very First Steps
Pandas First Steps
course content

Course Content

Pandas First Steps

Pandas First Steps

1. The Very First Steps
2. Reading Files in Pandas
3. Analyzing the Data

book
Series

Pandas offers two primary data structures: Series and DataFrame. The Series is the simpler of the two, resembling a one-dimensional array or a list. You can create a Series object using the pd.Series() constructor by passing a list as its argument.

12345
import pandas as pd numbers = [17, 43, 74, 20] series = pd.Series(numbers) print(series)
copy

In this example, we use the pd.Series() constructor to create a Series object containing a list of numbers.

Task
test

Swipe to show code editor

Your task is to create two Series objects from two existing lists, even_numbers and states.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
toggle bottom row

book
Series

Pandas offers two primary data structures: Series and DataFrame. The Series is the simpler of the two, resembling a one-dimensional array or a list. You can create a Series object using the pd.Series() constructor by passing a list as its argument.

12345
import pandas as pd numbers = [17, 43, 74, 20] series = pd.Series(numbers) print(series)
copy

In this example, we use the pd.Series() constructor to create a Series object containing a list of numbers.

Task
test

Swipe to show code editor

Your task is to create two Series objects from two existing lists, even_numbers and states.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 2
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt