pandas.errors.ValueLabelTypeMismatch# exception pandas.errors.ValueLabelTypeMismatch[源代码]# 当 category 列包含非字符串值时,to_stata 引发的警告。 Examples >>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")}) >>> df.to_stata('test') ... # ValueLabelTypeMismatch: Stata value labels (pandas categories) must be str...