Horje
select rows from dataframe pandas Code Example
how to get a row from a dataframe in python
df.iloc[[index]]
select rows from dataframe pandas
from pandas import DataFrame

boxes = {'Color': ['Green','Green','Green','Blue','Blue','Red','Red','Red'],
         'Shape': ['Rectangle','Rectangle','Square','Rectangle','Square','Square','Square','Rectangle'],
         'Price': [10,15,5,5,10,15,15,5]
        }

df = DataFrame(boxes, columns= ['Color','Shape','Price'])

select_color = df.loc[df['Color'] == 'Green']
print (select_color)




Python

Related
python numpy array boolean indexing Code Example python numpy array boolean indexing Code Example
python png library Code Example python png library Code Example
How to select parts of a numpy array Code Example How to select parts of a numpy array Code Example
integer to boolean numpy Code Example integer to boolean numpy Code Example
pip uninstalled itself Code Example pip uninstalled itself Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7