ValueError: Could not interpret input ‘index’ when using index with seaborn lineplot

I would rather prefer to use it this way. You need to remove hue as I assume it has a different purpose which doesn’t apply in your current DataFrame because you have a single line. Visit the official docs here for more info.

df=pd.DataFrame({'test':range(9),'test2':range(9)})
sns.lineplot(x=df.index, y='test', data=df)

Output

enter image description here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)