how to select specific column in pandas code example
Example 1: select columns pandas
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.
Example 2: how to get a row of a dataframe with subset columns in python
df.iloc[1:3, 5:7]