pandas.errors.ValueLabelTypeMismatch # 异常 pandas.errors。ValueLabelTypeMismatch [来源] # to_stata 对包含非字符串值的类别列发出警告。 例子 >>> df = pd.DataFrame({"categories": pd.Series(["a", 2], dtype="category")}) >>> df.to_stata('test') ... # ValueLabelTypeMismatch: Stata value labels (pandas categories) must be str...