Abschnitt 1. Kapitel 15
single
Column Names and Data Types
Swipe um das Menü anzuzeigen
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
Aufgabe
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.
Lösung
War alles klar?
Danke für Ihr Feedback!
Abschnitt 1. Kapitel 15
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen