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

bookSeries

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

You use the pd.Series() constructor to create a Series object that contains 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

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 2
single

single

Ask AI

expand

Ask AI

ChatGPT

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

Suggested prompts:

What is a DataFrame and how is it different from a Series?

Can I create a Series with custom index labels?

How do I access elements in a Series?

close

Awesome!

Completion rate improved to 3.03

bookSeries

Swipe to show menu

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

You use the pd.Series() constructor to create a Series object that contains 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
single

single

some-alt