I have a dataset that includes multiple variables, and I want to create a scatter plot to visualize the relationship between two variables, but I also want to include a unique identifier for each data point. Can someone provide me with some code or guidance on how to do this?
Here is an example of what my data looks like:
import pandas as pd
import numpy as np
data = {'X': np.random.randn(10), 'Y': np.random.randn(10), 'ID': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J']}
df = pd.DataFrame(data)
I want to create a scatter plot with X
on the x-axis and Y
on the y-axis, but I want to label each point with its corresponding ID
value.
Any help would be greatly appreciated!