如何修复:typeError:relplot()用seaborn

问题描述 投票:0回答:1

我试图用我的数据框与Seaborn一起绘制

line plot
使用:

Data

使我有一个错误:
sns.relplot(Data, x="InvoiceYearMonth", y="price", hue="company")

有什么错?
这里是我的数据示例以供您参考:

TypeError: relplot() got multiple values for argument 'x'

您double指定
InvoiceYearMonth company price 0 202001 companyA 1509.40 1 202001 companyB 469.00 2 202001 companyC 358.81 3 202002 companyD 870.00 4 202002 companyE 465.58 5 202002 companyF 563.00 6 202003 companyG 1140.00
python dataframe seaborn
1个回答
6
投票
x

设置为

x
,然后将命名参数
Data
(设置
x
x
)。 尝试一下:
"InvoiceYearMonth"
    

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.