Answers for "count proportion pandas"

0

count proportion pandas

import pandas as pd

dogs = pd.DataFrame({
    'dog_name':['REX', 'WALTER', 'BLAZE', 'JASPER', 'TEDDY'], 
    'breed':['KOBE', 'OSCAR', 'OSCAR', 'KOBE', 'MAX']
})

print(dogs.value_counts(normalize=True))
Posted by: Guest on September-27-2021

Python Answers by Framework

Browse Popular Code Answers by Language