Pandy Wybierz kolumny, w których wartość jest prawdziwa
df.loc[df['column_name'] == some_value]
Wicked Wasp
df.loc[df['column_name'] == some_value]
df.col_name.value_counts()
Out[345]:
False 6
True 1
Name: has_cancer, dtype: int64
df.has_cancer.value_counts()
Out[345]:
False 6
True 1
Name: has_cancer, dtype: int64