'Convert string-like columns to/from bytestring and unicode (internal only).
Parameters
in_kind : str
Input dtype.kind
out_kind : str
Output dtype.kind
python3_only : bool
Only do this operation for Python 3'

def _convert_string_dtype(self, in_kind, out_kind, python3_only):

    if (python3_only and six.PY2):
        return
    cols = self.columns.values()
    if (not any(((col.dtype.kind == in_kind) for col in cols))):
        return
    newcols = []
    for col in cols:
        if (col.dtype.kind == in_kind):
            newdtype = re.sub(in_kind, out_kind, col.dtype.str)
            newcol = col.__class__(col, dtype=newdtype)
        else:
            newcol = col
        newcols.append(newcol)
    self._init_from_cols(newcols)
