python - 将数据框解析为 Pandas 分析库时出现 TypeError
问题描述
我在对数据使用 pandas-profiling 时遇到 TypeError,如下所示:
汇总数据集:2% 1/59 [00:09<09:20, 9.66s/it, Describe variable:project] -->>
~\Anaconda3\lib\site-packages\pandas\core\algorithms.py in isin(comps, values)
441 # If the the values include nan we need to check for nan explicitly
442 # since np.nan it not equal to np.nan
--> 443 if np.isnan(values).any():
444 f = lambda c, v: np.logical_or(np.in1d(c, v), np.isnan(c))
445 else:
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
请帮忙。我不知道这是怎么回事。
解决方案
自己解决了。查看 Pandas-Profiling Github 页面:
https://github.com/pandas-profiling/pandas-profiling/issues/752#issuecomment-815462226
推荐阅读
- mysql - MYSQL 从 Table1 获取 id 并在 INSERTING 值时插入到 Table2(用户表单)
- unity3d - 在 Unity 中围绕瓷砖平台移动对象
- ios - 如何以编程方式将数据从表视图控制器传递到另一个控制器?
- python - 从多个字典列表中返回特定键中具有最高值的字典
- c# - .NET 无法使用 sinch 发送 SMS
- image-processing - 将图像的像素更改为给定颜色集中最接近的颜色
- pandas - Pandas 获得预聚合数据的中值/平均值
- python - Python 中的 pre_word() 函数
- openshift - 引导完成的 Openshift 4.4 问题
- javascript - 为什么没有任何混淆器与我的 Javascript 代码一起工作?是因为ecmascript吗?