DataArray.str.count(pat, flags=0)

Count occurrences of pattern in each string of the array.

This function is used to count the number of times a particular regex pattern is repeated in each of the string elements of the DataArray.

  • pat (str) – Valid regular expression.

  • flags (int, default: 0) – Flags for the re module. Use 0 for no flags. For a complete list, see here.


counts (array of int)