select coluns from df code example
Example 1: select specific rows from dataframe in python
select_color = df.loc[df['Color'] == 'Green']
Example 2: select columns pandas
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.