get all rows with value pandas code example
Example 1: only keep rows of a dataframe based on a column value
df.loc[df['column_name'] == some_value]
Example 2: get all count rows pandas
count_row = df.shape[0] # gives number of row count
count_col = df.shape[1] # gives number of col count
Example 3: how to select rows based on column value pandas
df.loc[df['column_name'] == some_value]