DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
get maximum values in a column by a subgroup of a dataframe pandas
df.sort_values('count', ascending=False).drop_duplicates(['Sp','Mt'])
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#maximum
#values
#column
#subgroup
#dataframe
#pandas
ADD COMMENT
Topic
COMMENT
Name
1+2 =
Submit