小编Drz*_*rzw的帖子

Seaborn lineplot,类型错误:输入类型不支持 ufunc 'isfinite'

尝试使用 seaborn 绘制线图时出现以下错误。

TypeError: ufunc 'isfinite' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Run Code Online (Sandbox Code Playgroud)

重现错误的最小示例:

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd

dataset = {
    "x": [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3],
    "y": [1.0, 2.3, 4.5, 1.2, 3.4, 5.3, 1.1, 2.4, 3.6, 1.1, 3.3, 5.3],
    "id": ["a", "a", "a", "b", "b", "b", "a", …
Run Code Online (Sandbox Code Playgroud)

python matplotlib seaborn

8
推荐指数
1
解决办法
1926
查看次数

标签 统计

matplotlib ×1

python ×1

seaborn ×1