easy5 pts · first answer countspandas
value_counts with normalize
What does this code print?
import pandas as pd s = pd.Series(['a', 'b', 'a', 'a']) print(s.value_counts(normalize=True)['a'])
Discussion 0
Join free to post in the discussion.
Related questions
- Counting missing values in pandasData Scientist
- pandas mean with a missing valueData Scientist
- Dates read as plain textData Scientist
- Keeping the latest row per emailData Scientist
- Sorting by city then by salesData Scientist
- Getting the weekday from a date columnData Scientist
- A random sample that repeatsData Scientist
- Filtering rows for several citiesData Scientist