To select multiple columns from a DataFrame, we need to pass the columns as a list to the DataFrame as follows:
region_n_state = data[['RegionName', 'State']] region_n_state.head()
Now, let's confirm whether the resulting object is a series or a DataFrame by using the type function, as follows:
Following is the output:
As can be seen in the preceding screenshot, selecting multiple columns creates another DataFrame, whereas selecting just a single column creates a series object.