7

如果我跑

    import pandas as pd
    import mpld3
    import seaborn as sns
    df = pd.DataFrame([(1,3),(2,-1)],columns= ['a','b'])
    plt.figure(figsize=(5,5))
    sns.regplot('a', 'b', df)

工作正常。如果我添加

    mpld3.enable_notebook()

我收到错误:“ndarray”类型的对象不是 JSON 可序列化的

您对导致 mpld3 烦恼的原因有什么建议吗?

据我所知,这与NumPy array is not JSON serializable 中提出的问题不同。

4

0 回答 0