成功解决 ValueError: fill value must be in categories

简介: 成功解决 ValueError: fill value must be in categories


目录

解决问题

解决思路

解决方法


解决问题

raise ValueError("fill value must be in categories")

ValueError: fill value must be in categories

解决思路

引发值错误(“填充值必须在类别中”)

值错误:填充值必须在类别中

解决方法

df.fillna(value=-1)

改为

df.fillna(value=’-1’)


相关文章
|
2月前
|
TensorFlow 算法框架/工具 Python
|
8月前
|
数据处理 开发者 Python
【Python】已解决:ValueError: Length mismatch: Expected axis has 5 elements, new values have 4 elements
【Python】已解决:ValueError: Length mismatch: Expected axis has 5 elements, new values have 4 elements
603 9
成功解决ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
成功解决ValueError: Input contains NaN, infinity or a value too large for dtype('float64').
|
编译器 Python
ValueError matplotlib display text must have all code points 128 or use Unicode strings
ValueError matplotlib display text must have all code points 128 or use Unicode strings
256 0
|
Linux Python
ValueError: empty range for randrange() (0, 0, 0)
ValueError: empty range for randrange() (0, 0, 0)
成功解决ValueError: Dimension 1 in both shapes must be equal, but are 1034 and 1024. Shapes are [100,103
成功解决ValueError: Dimension 1 in both shapes must be equal, but are 1034 and 1024. Shapes are [100,103
成功解决raise KeyError(f“None of [{key}] are in the [{axis_name}]“)KeyError: “None of [Index([‘age.in.y
成功解决raise KeyError(f“None of [{key}] are in the [{axis_name}]“)KeyError: “None of [Index([‘age.in.y
成功解决TypeError: concat() got an unexpected keyword argument ‘join_axes‘
成功解决TypeError: concat() got an unexpected keyword argument ‘join_axes‘