count proportion pandas

Solutions on MaxInterview for count proportion pandas by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "count proportion pandas"
Lea
18 Apr 2019
1import pandas as pd
2
3dogs = pd.DataFrame({
4    'dog_name':['REX', 'WALTER', 'BLAZE', 'JASPER', 'TEDDY'], 
5    'breed':['KOBE', 'OSCAR', 'OSCAR', 'KOBE', 'MAX']
6})
7
8print(dogs.value_counts(normalize=True))