Answers for "value_counts to list"

0

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()
Posted by: Guest on August-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language