Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

plot une dataframe


la dataframe des iris

Loading...
Loading...

visualisation avec df.plot()

<Figure size 640x480 with 1 Axes>

boxplots des colonnes df.boxplot

<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

histogrammes df.hist()

<Figure size 640x480 with 4 Axes>
<Figure size 640x480 with 1 Axes>

barchart df.plot.bar()

<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>

catégories

le type de la colonne 'Name'

Loading...
Name Iris-setosa 50 Iris-versicolor 50 Iris-virginica 50 Name: count, dtype: int64
<StringDtype(na_value=nan)>

encodage de 'Name' en catégories

0 Iris-setosa 1 Iris-setosa Name: Name, dtype: category Categories (3, str): ['Iris-setosa', 'Iris-versicolor', 'Iris-virginica']
Name-code 0 50 1 50 2 50 Name: count, dtype: int64

nuages de points df.plot.scatter()

<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 1 Axes>
<Figure size 640x480 with 2 Axes>
<Figure size 640x480 with 2 Axes>
<Figure size 640x480 with 1 Axes>

fabriquer son propre type category

CategoricalDtype(categories=['Iris-versicolor', 'Iris-virginica', 'Iris-setosa'], ordered=True, categories_dtype=str)
Loading...