take certain rows of dataframe code example
Example 1: how to get a row from a dataframe in python
df.iloc[[index]]
Example 2: select specific rows from dataframe in python
select_color = df.loc[df['Color'] == 'Green']
df.iloc[[index]]
select_color = df.loc[df['Color'] == 'Green']