Dataframe 0.14 Help

valueCounts

Return DataFrame containing counts of unique values in DataFrame or DataColumn.

valueCounts(sort = true, ascending = false, dropNA = false) [ { columns } ]

Parameters:

  • sort: Boolean = true — sort by count

  • ascending: Boolean = false — sort in ascending order

  • dropNA: Boolean = true — don't include counts of NA value

  • columns = all — columns to use when counting unique combinations

df.city.valueCounts() df.valueCounts { name and city }
Last modified: 27 September 2024