Reputation: 23
I am trying to make a visualization of Italy's Covid-19 data. However, when I tried to use Seaborn's scatterplot in visualizing my data, it couldn't interpret the inputted column even though I had made sure the column is not the dataframe's index.
Below is the screenshot:
Below is the data:
Italy_data.xlsx Gdrive Drive File
So what I want to do is that I want to visualize the rising number of cumulative deaths and cases based on the date/timestamp on the column of "Converted_Date_reported".
Upvotes: 2
Views: 342
Reputation: 35135
The cause is that the column name contains a space character at the beginning. If you include it, the error will not occur. You should do some data maintenance before that.
g = sns.lineplot(x=df['Converted_Date_reported'], y=df[' Cumulative_cases'], data=df)
Upvotes: 2