def _can_convert_to_string(value): vtype = type(value) return isinstance(value, basestring) or vtype in [np.unicode_, np.string_, np.str_]