Outils pour utilisateurs

Outils du site


python:first_course_statistics

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

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/08 13:24]
Beretta, Anna Letizia
python:first_course_statistics [2016/10/09 23:06]
Francesco Beretta
Ligne 1: Ligne 1:
  
 +====== General instructions ======
 +
 +Read following important documentation about:
 +  * pandas: accessing dataframes (tables)
 +  * [[http://​matplotlib.org/​api/​pyplot_summary.html|matplotlib.pyplot]]
  
  
Ligne 7: Ligne 12:
 ===== Histogram (p.5) ===== ===== Histogram (p.5) =====
  
-This is my first function.+FB: this script works fine !
  
 <code python> <code python>
-# fake code – to be deleted +import ​pandas as pd 
-import ​csv +import matplotlib.pyplot as plt 
- +gys1 pd.DataFrame(pd.read_csv('../​geyser1.TAB', '\t')
-csvfile ​open('D:​\data-wrangling-master\data-wrangling-master\data\chp3\data-text.csv', 'rb') +g_int gys1['​Interval'​] 
-reader ​csv.reader(csvfile+ax = plt.gca() 
- +ax.hist(g_int,​ bins=20, color='​r'​) 
-for row in reader: +ax.set_xlabel('​Intereruption time') 
-    print(row)+ax.set_ylabel('​Frequency'​) 
 +ax.set_title('​Histogram'​) 
 +plt.show() 
 </​code>​ </​code>​
  
python/first_course_statistics.txt · Dernière modification: 2017/09/26 08:54 par Francesco Beretta