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

Kursinnhold

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.

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 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.

Oppgave

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.

Løsning

Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Alt var klart?

Hvordan kan vi forbedre det?

Takk for tilbakemeldingene dine!

Seksjon 1. Kapittel 2
Switch to desktopBytt til skrivebordet for virkelighetspraksisFortsett der du er med et av alternativene nedenfor
Vi beklager at noe gikk galt. Hva skjedde?
some-alt