a=range(5) a a.remove(3) a.remove? a def divide(): a = 1 b = 4 c = b / (a-1) divide() pwd ! open unpause_action.pdf %timeit a*3 from IPython.lib.display import YouTubeVideo YouTubeVideo('HaS4NXxL5Qc') x = linspace(0, 2*pi) y = sin(x) plot(x,y) show() ! head data/kaggle/wind_forecast/train.csv import pandas as pd def format_timestamp(raw): return '%s %s:00' % (raw[:-2], raw[-2:]) wind = pd.read_csv('data/kaggle/wind_forecast/train.csv', parse_dates=['date'], index_col=['date'], converters={'date':format_timestamp}) wind wind.index a = '2009-07-01' b = '2009-07-03' wind[a:b].plot() ylabel('normalized wind power') wind['wp1'][a:b].plot(color='red', label='raw power') pd.ewma(wind['wp1'], span=100)[a:b].plot(color='blue', label='smoothed') legend() from sympy import * v = symbols('v') integrate(log(v), v)