Counting Values
You may also find number of occurances of each unique value in a corresponding column by using the .value_counts() method. For instance, we can get number of each model in a dataset.
1234567# Importing library import pandas as pd # Reading csv file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/67798cef-5e7c-4fbc-af7d-ae96b4443c0a/audi.csv') # Number of each model print(df.model.value_counts())
Tout était clair ?
Merci pour vos commentaires !
Section 4. Chapitre 3
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Suggested prompts:
Posez-moi des questions sur ce sujet
Résumer ce chapitre
Afficher des exemples du monde réel
Génial!
Completion taux amélioré à 3.33
Counting Values
Glissez pour afficher le menu
You may also find number of occurances of each unique value in a corresponding column by using the .value_counts() method. For instance, we can get number of each model in a dataset.
1234567# Importing library import pandas as pd # Reading csv file df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/67798cef-5e7c-4fbc-af7d-ae96b4443c0a/audi.csv') # Number of each model print(df.model.value_counts())
Tout était clair ?
Merci pour vos commentaires !
Section 4. Chapitre 3