Sezione 1. Capitolo 15
single
Column Names and Data Types
Scorri per mostrare il menu
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
Compito
Swipe to start coding
You are given a DataFrame named wine_data.
- Get the column names that this
DataFramecontains and store the result in thecolumn_namesvariable. - Get the data types of these columns from this
DataFrameand store the result in thedata_typesvariable.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 15
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione