two ways to access column in dataframe python code example Example: df only take 2 columns df1 = df[['a', 'b']]