首页 > 解决方案 > 错误:plt.hist(df1.Score A),Python Pandas/Seaborn

问题描述

我的代码:

plt.hist(df1.Score A)

File "<ipython-input-14-dff3e3378235>", line 2
    plt.hist(df1.Score A)
                       ^
SyntaxError: invalid syntax

该代码导致上述错误。你能建议如何解决这个问题吗?我认为由于 Column Name : "Score A"中有一个“空格” ,所以它给出了一个错误。

标签: pythonpandasmatplotlibseaborn

解决方案


用这个:

plt.hist(df1['Score A'])

推荐阅读