parameters: (name)
return_statement: return name
docstring: Ensure that an index / column name is a str (python 3) or
      unicode (python 2); otherwise they may be np.string dtype.
      Non-string dtypes are passed through unchanged.
  
      https://github.com/pandas-dev/pandas/issues/13492
docstring_summary: Ensure that an index / column name is a str (python 3) or
      unicode (python 2); otherwise they may be np.string dtype.
      Non-string dtypes are passed through unchanged.
docstring_tokens: Ensure that an index / column name is a str ( python 3 ) or unicode ( python 2 ) ; otherwise they may be np . string dtype . Non - string dtypes are passed through unchanged .
function: def _ensure_str(name):
      """Ensure that an index / column name is a str (python 3) or
      unicode (python 2); otherwise they may be np.string dtype.
      Non-string dtypes are passed through unchanged.
  
      https://github.com/pandas-dev/pandas/issues/13492
      """
      if isinstance(name, compat.string_types):
          name = compat.text_type(name)
      return name
function_tokens: def _ensure_str ( name ) : if isinstance ( name , compat . string_types ) : name = compat . text_type ( name ) return name