maha = df[df.state == ‘Maharashtra’]
sns.set(rc={‘figure.figsize’:(15,10)})
sns.lineplot(x=”date”,y=”confirmed”,data=maha,color=”g”)
plt.show()
Code Explanation:
We start off by extracting all the records where the state is equal to “Maharashtra”:
maha = df[df.state == ‘Maharashtra’]
Then, we go ahead and make a line-plot using seaborn library:
sns.set(rc={‘figure.figsize’:(15,10)})
sns.lineplot(x=”date”,y=”confirmed”,data=maha,color=”g”)
plt.show()
Here, we map the “date” column onto the x-axis and “confirmed” column onto y-axis.