1 Upvote

Filter Dataframe For Rows that Contain a Columns Largest Value

Python
Data Preprocessing

top_values = df[df['value']==df['value'].max()]

By detro - Last Updated May 7, 2022, 4:04 p.m.

Did you find this snippet useful?

Sign up to bookmark this in your snippet library

COMMENTS
RELATED SNIPPETS
Pivoting Pandas Dataframes
Python
Data Preprocessing

Pandas

3
2
Top Contributors
103
100