Exercise 17 solutions
Table of Contents
Python
e17.py
from pandas.io.excel import read_excel from numpy import mean d = read_excel("e17data.xlsx","Sheet 1 - Table 1") m1 = mean(d['age']) m2 = mean(d['score'])
MATLAB / Octave
e17.m
[d,titles] = xlsread('e17data.xlsx'); m1 = mean(d(:,2)); m2 = mean(d(:,3));
R
e17.R
library(gdata) d = read.xls("e17data.xlsx") m1 = mean(d[,2]) m2 = mean(d[,3])