Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Exploring the Dataset | Analyzing the Data
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
Exploring the Dataset

In pandas, there's a handy method named info() that provides basic information about a dataset.

12345
import pandas as pd # It's a dataframe df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a43d24b6-df61-4e11-9c90-5b36552b3437/example.csv') info = df.info() print(info)
copy

This method displays the number of rows and columns in the DataFrame, as well as each column's name and data type. For instance, df contains 20 rows and 5 columns.

To determine the length of the DataFrame, we can use the len() function, as demonstrated in the example below:

python
Oppgave

Swipe to start coding

You are given a DataFrame named wine_data.

  • Get more detailed information about this dataset and store the result in the information variable.

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 3. Kapittel 4
toggle bottom row

book
Exploring the Dataset

In pandas, there's a handy method named info() that provides basic information about a dataset.

12345
import pandas as pd # It's a dataframe df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/a43d24b6-df61-4e11-9c90-5b36552b3437/example.csv') info = df.info() print(info)
copy

This method displays the number of rows and columns in the DataFrame, as well as each column's name and data type. For instance, df contains 20 rows and 5 columns.

To determine the length of the DataFrame, we can use the len() function, as demonstrated in the example below:

python
Oppgave

Swipe to start coding

You are given a DataFrame named wine_data.

  • Get more detailed information about this dataset and store the result in the information variable.

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 3. Kapittel 4
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