Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
python:first_course_statistics [2016/10/17 07:41] Francesco Beretta [ScatterPlot (p. 7)] |
python:first_course_statistics [2016/10/17 07:58] Francesco Beretta [Descriptive statistics] |
||
---|---|---|---|
Ligne 65: | Ligne 65: | ||
plt.show() | plt.show() | ||
</code> | </code> | ||
+ | |||
+ | ===== Descriptive statistics (p.9) ===== | ||
+ | |||
+ | Note: try different examples, e.g. the whole population or only those where 'Duration' <= 3, the whole dataframe | ||
+ | |||
+ | [[http://pandas.pydata.org/pandas-docs/stable/basics.html#descriptive-statistics|doc]] – [[http://www.marsja.se/pandas-python-descriptive-statistics/|example]] | ||
+ | |||
+ | <code python> | ||
+ | import pandas as pd | ||
+ | gysr1 = pd.read_csv('../geyser1.tab', '\t') | ||
+ | gysr1['Duration'][gysr1['Duration'] <= 3].describe() | ||
+ | </code> | ||
+ | |||
===== Boxplot (p.9) ===== | ===== Boxplot (p.9) ===== |