In [1]:
# génération de valeurs aléatoires
import numpy
x = numpy.random.randint(1,101,5)
y = numpy.random.randint(1,101,5)

# print
print(x)
print(y)
[100  24  48  42  77]
[17 35 85 70 81]
In [2]:
# mettre sous la forme d'un data frame
import pandas
df = pandas.DataFrame({"x":x,"y":y})
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 5 entries, 0 to 4
Data columns (total 2 columns):
 #   Column  Non-Null Count  Dtype
---  ------  --------------  -----
 0   x       5 non-null      int64
 1   y       5 non-null      int64
dtypes: int64(2)
memory usage: 212.0 bytes
In [3]:
# graphique
import seaborn as sns
sns.scatterplot(x=df.x,y=df.y)
Out[3]:
<Axes: xlabel='x', ylabel='y'>
No description has been provided for this image