def _ensure_str(name):
if isinstance(name, str):<EOL><INDENT>name = str(name)<EOL><DEDENT>return name<EOL>
Ensure that an index / column name is a str (python 3); otherwise they
may be np.string dtype. Non-string dtypes are passed through unchanged.

https://github.com/pandas-dev/pandas/issues/13492