To select multiple columns in a Python Pandas dataframe, we pass in an array of column names to select.
For instance, we write
df1 = df[['a', 'b']]
to select columns
'b' and return it.
If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.