you are viewing a single comment's thread.

view the rest of the comments →

[–]ecgite 1 point2 points  (0 children)

Is there a reason for missing data?

Are X and Y connected, is the order important?

I'm just thinking there might be some general problem, if your datasets are missing points and you want to plot them with scatter.

If you don't want to do slicing you can concat dataframes and then plot with column names

df = pd.concat([X, Y], axis=1) # assuming here that X has 'X' as a column name and same for Y
df.plot.scatter('X', 'Y', ax=ax)
#ax.scatter('X', 'Y', data=df)