Selecting and picking columns from a Dataframe

In [1]:
import pandas as pd
df = pd.DataFrame([['AA', "temp", 1],['BB', "temp", 2],['CC', "temp", 3]], columns = ['name','temp', 'value'])

In [2]:
df


Out[2]:
name temp value
0 AA temp 1
1 BB temp 2
2 CC temp 3

In [3]:
df = df[["name","temp"]]

In [4]:
df


Out[4]:
name temp
0 AA temp
1 BB temp
2 CC temp

In [ ]: