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

Swipe to show menu

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

Swipe to start coding

You are given two lists: even_numbers and states.

  • Create a Series named numbers_series from the even_numbers list.

  • Create a Series named states_series from the states list.

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
We're sorry to hear that something went wrong. What happened?

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

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

Swipe to start coding

You are given two lists: even_numbers and states.

  • Create a Series named numbers_series from the even_numbers list.

  • Create a Series named states_series from the states list.

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