In [3]:
%matplotlib inline
 
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
 
x = np.random.rand(100)
y = np.random.rand(100)

df = pd.DataFrame(dict(x=x, y=y,))

plt.scatter(x, y)
plt.show()
df
Out[3]:
x y
0 0.383202 0.594648
1 0.205188 0.239019
2 0.141145 0.869723
3 0.484748 0.025293
4 0.627281 0.851086
... ... ...
95 0.470970 0.090401
96 0.717743 0.799334
97 0.377164 0.686360
98 0.441632 0.864726
99 0.490379 0.432262

100 rows × 2 columns