Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Column Names and Data Types | Section
Data Manipulation with pandas
Seksjon 1. Kapittel 15
single

single

bookColumn Names and Data Types

Sveip for å vise menyen

To display all column names as a list, use the following line of code:

column_names = df.columns

To get a summary of all data types in the DataFrame, use the following attribute: .dtypes.

data_types = df.dtypes
Oppgave

Swipe to start coding

You are given a DataFrame named wine_data.

  • Get the column names that this DataFrame contains and store the result in the column_names variable.
  • Get the data types of these columns from this DataFrame and store the result in the data_types 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 1. Kapittel 15
single

single

Spør AI

expand

Spør AI

ChatGPT

Spør om hva du vil, eller prøv ett av de foreslåtte spørsmålene for å starte chatten vår

some-alt