I have a pandas dataframe (db_USA) that I'm using to create a scatterplot.
I want to label each observation with the values in the "TIME" column.
The examples I've found use a list, and I've tried converting the columns im using in the code to lists but I'm not getting the result I'm looking for
plt.scatter(db_USA["Value"], db_USA["3M Change %"])
plt.axvline(x=100.0, color ="black")
plt.axhline(y=0.0, color="black")
plt.xlim(right=103)
for i, txt in enumerate(list(db_USA["TIME"])):
plt.annotate(txt, (list(db_USA["Value"])[i],list(db_USA["LOCATION"])[i]))
plt.show()
This is the result I'm getting.
Any suggestions are welcomed. Thank you.