Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Series
What DataFrames are
DataFrame columns
13. Showing multiple columns
DataFrame rows
Filtering rows and columns
Filtering data frames
Sorting rows
Summary

Instruction

Great! In a similar manner we can get multiple columns at the same time:

hospitals[['Hospital Name', 'City']]

The argument we provide in single brackets is a list with the names of the columns we want to retrieve.

That's why we have double brackets: the first bracket means we're filtering a DataFrame. The second bracket creates a list with the names of the columns to retrieve.

Exercise

Now it's your turn! From the eu_states DataFrame select two columns: Country, and Accession Year. Assign the new DataFrame to the eu_accession_info variable.