parameters: (arr, sep="|")
return_statement: return dummies, tags
docstring: Split each string in the Series by sep and return a DataFrame
      of dummy/indicator variables.
  
      Parameters
      ----------
      sep : str, default "|"
          String to split on.
  
      Returns
      -------
      DataFrame
          Dummy variables corresponding to values of the Series.
  
      See Also
      --------
      get_dummies : Convert categorical variable into dummy/indicator
          variables.
  
      Examples
      --------
      >>> pd.Series(['a|b', 'a', 'a|c']).str.get_dummies()
         a  b  c
      0  1  1  0
      1  1  0  0
      2  1  0  1
  
      >>> pd.Series(['a|b', np.nan, 'a|c']).str.get_dummies()
         a  b  c
      0  1  1  0
      1  0  0  0
      2  1  0  1
docstring_summary: Split each string in the Series by sep and return a DataFrame
      of dummy/indicator variables.
docstring_tokens: Split each string in the Series by sep and return a DataFrame of dummy / indicator variables .
function: def str_get_dummies(arr, sep="|"):
      """
      Split each string in the Series by sep and return a DataFrame
      of dummy/indicator variables.
  
      Parameters
      ----------
      sep : str, default "|"
          String to split on.
  
      Returns
      -------
      DataFrame
          Dummy variables corresponding to values of the Series.
  
      See Also
      --------
      get_dummies : Convert categorical variable into dummy/indicator
          variables.
  
      Examples
      --------
      >>> pd.Series(['a|b', 'a', 'a|c']).str.get_dummies()
         a  b  c
      0  1  1  0
      1  1  0  0
      2  1  0  1
  
      >>> pd.Series(['a|b', np.nan, 'a|c']).str.get_dummies()
         a  b  c
      0  1  1  0
      1  0  0  0
      2  1  0  1
      """
      arr = arr.fillna("")
      try:
          arr = sep + arr + sep
      except TypeError:
          arr = sep + arr.astype(str) + sep
  
      tags = set()
      for ts in arr.str.split(sep):
          tags.update(ts)
      tags = sorted(tags - {""})
  
      dummies = np.empty((len(arr), len(tags)), dtype=np.int64)
  
      for i, t in enumerate(tags):
          pat = sep + t + sep
          dummies[:, i] = lib.map_infer(arr.to_numpy(), lambda x: pat in x)
      return dummies, tags
function_tokens: def str_get_dummies ( arr , sep = "|" ) : arr = arr . fillna ( "" ) try : arr = sep + arr + sep except TypeError : arr = sep + arr . astype ( str ) + sep tags = set ( ) for ts in arr . str . split ( sep ) : tags . update ( ts ) tags = sorted ( tags - { "" } ) dummies = np . empty ( ( len ( arr ) , len ( tags ) ) , dtype = np . int64 ) for i , t in enumerate ( tags ) : pat = sep + t + sep dummies [ : , i ] = lib . map_infer ( arr . to_numpy ( ) , lambda x : pat in x ) return dummies , tags