extract columns from main Dataframe

We can do like this:

df1 = df[['a','b']]

Example:

In [39]: dfOut[39]:    index  a  b  c0      1  2  3  41      2  3  4  5In [40]: df1 = df[['b', 'c']]In [41]: df1Out[41]:    b  c0  3  41  4  5