Subset df by column names

 avatar
user_6939821
python
a year ago
118 B
2
Indexable
# creating subset dataframe using 
# indexing operator

df[['Name', 'pre_1', 'pre_2']]
##  leave only these 3 cols