select column value pandas code example
Example 1: pandas select by column value
df.loc[df['column_name'] == some_value]
Example 2: select columns pandas
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.
df.loc[df['column_name'] == some_value]
df1 = df.iloc[:,0:2] # Remember that Python does not slice inclusive of the ending index.