Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

value_counts to list

df[column].value_counts()

# get indexes
df[column].value_counts().index.tolist()

# get values of occurrences
df[column].value_counts().values.tolist()
Source by leportella.com #
 
PREVIOUS NEXT
Tagged: #list
ADD COMMENT
Topic
Name
5+7 =