Skip to content

Instantly share code, notes, and snippets.

@araastat
Created November 30, 2013 04:29
Show Gist options
  • Save araastat/7715395 to your computer and use it in GitHub Desktop.
Save araastat/7715395 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<script type=\"text/javascript\">\n",
" on = \"View code\";\n",
" off = \"Hide code\"\n",
" function onoff(){\n",
" currentvalue = document.getElementById('onoff').value;\n",
" if(currentvalue == off){\n",
" document.getElementById(\"onoff\").value=on;\n",
" $('div.input').hide();\n",
" $('div.output_prompt').hide();\n",
" }else{\n",
" document.getElementById(\"onoff\").value=off;\n",
" $('div.input').show();\n",
" $('div.output_prompt').show();\n",
" }\n",
"}\n",
" window.onload = onoff;\n",
"</script>\n",
"<input type=\"button\" value=\"Hide code\" id=\"onoff\" onclick=\"onoff();\">"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"%pylab inline"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import pandas as pd"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 4
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"dat = pd.io.excel.read_excel('volumes.xlsx','Sheet1')"
],
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"plot(dat.Baseline, dat.change,'.');"
],
"language": "python",
"metadata": {},
"outputs": [
{
"metadata": {},
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEACAYAAAC3adEgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF1pJREFUeJzt3X9sU+e9x/HPqZJ/ELCyrnGY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ruvXr5sN\nGzaYJ5980lqezva6VU3pbKsPP/zQfPLJJ8YYYz799FOzePFic+zYsbS2061qisVi8fukY5u6IRgM\nmm9961vGmMx5/32xplRsTxkTDMYYc+TIEVNUVGQKCgrMz3/+85Q97wcffGBKS0tNaWmpmTdvXvy5\nP/74Y7NkyRLj8/lMZWVlfGM2xpif/exnpqCgwMyZM8e0t7cnpY5169aZmTNnmtzcXOPxeMxvf/vb\nMdXw9ttvm/nz55uCggLzgx/8IOl1NTc3mw0bNpiSkhKzYMEC8+1vf9v09/entK4TJ04Yx3FMaWmp\nKSsrM2VlZaatrS2t7TVaTUeOHElrW/3tb38z5eXlprS01JSUlJhf/OIXxpixbdsTXVO6t6kbgsFg\nfARQJrz/jDHmzTffjNf06KOPTng7McENAGDJmD4GAEBmIBgAABaCAQBgIRgAABaCAQBgIRgAABaC\nAQBgIRgAAJb/BxyTBBp3smgzAAAAAElFTkSuQmCC\n",
"text": [
"<matplotlib.figure.Figure at 0x106153610>"
]
}
],
"prompt_number": 8
},
{
"cell_type": "code",
"collapsed": false,
"input": [],
"language": "python",
"metadata": {},
"outputs": []
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment