class_docstr: String Methods operating on object-dtype ndarrays.
class_docstr_tok: ["String","Methods","operating","on","object-dtype","ndarrays","."]
code: def _str_get_dummies(self, sep: str = "|"):
      from pandas import Series
  
      arr = Series(self).fillna("")
      try:
          arr = sep + arr + sep
      except (TypeError, NotImplementedError):
          arr = sep + arr.astype(str) + sep
  
      tags: set[str] = set()
      for ts in Series(arr, copy=False).str.split(sep):
          tags.update(ts)
      tags2 = sorted(tags - {""})
  
      dummies = np.empty((len(arr), len(tags2)), dtype=np.int64)
  
      def _isin(test_elements: str, element: str) -> bool:
          return element in test_elements
  
      for i, t in enumerate(tags2):
          pat = sep + t + sep
          dummies[:, i] = lib.map_infer(
              arr.to_numpy(), functools.partial(_isin, element=pat)
          )
      return dummies, tags2
  
imports: from __future__ import annotations
  import functools
  import re
  import textwrap
  from typing import TYPE_CHECKING, Callable, Literal, cast
  import unicodedata
  import numpy
  from pandas._libs import lib
  import pandas._libs.missing
  import pandas._libs.ops
  from pandas.core.dtypes.missing import isna
  from pandas.core.strings.base import BaseStringArrayMethods
label_desc: Use image node_id 30 for calling the ObjectStringArrayMixin obj's underlying member method code with example usage: obj._str_get_dummies(sep) and returns: dummies,  tags2, unknown