Skip to content

Instantly share code, notes, and snippets.

@paulperry
Created August 18, 2016 17:27
Show Gist options
  • Save paulperry/12cfe34897000cc80581e7ae15d6299c to your computer and use it in GitHub Desktop.
Save paulperry/12cfe34897000cc80581e7ae15d6299c to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# DW test"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import pandas as pd\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"INSTALLED VERSIONS\n",
"------------------\n",
"commit: None\n",
"python: 3.5.2.final.0\n",
"python-bits: 64\n",
"OS: Darwin\n",
"OS-release: 15.6.0\n",
"machine: x86_64\n",
"processor: i386\n",
"byteorder: little\n",
"LC_ALL: None\n",
"LANG: en_US.UTF-8\n",
"\n",
"pandas: 0.18.1\n",
"nose: 1.3.7\n",
"pip: 8.1.2\n",
"setuptools: 20.3\n",
"Cython: 0.23.4\n",
"numpy: 1.10.4\n",
"scipy: 0.17.0\n",
"statsmodels: 0.6.1\n",
"xarray: None\n",
"IPython: 4.1.2\n",
"sphinx: 1.3.5\n",
"patsy: 0.4.0\n",
"dateutil: 2.5.1\n",
"pytz: 2016.2\n",
"blosc: None\n",
"bottleneck: 1.0.0\n",
"tables: 3.2.2\n",
"numexpr: 2.5\n",
"matplotlib: 1.5.1\n",
"openpyxl: 2.3.2\n",
"xlrd: 0.9.4\n",
"xlwt: 1.0.0\n",
"xlsxwriter: 0.8.4\n",
"lxml: 3.6.0\n",
"bs4: 4.4.1\n",
"html5lib: None\n",
"httplib2: None\n",
"apiclient: None\n",
"sqlalchemy: 1.0.12\n",
"pymysql: None\n",
"psycopg2: None\n",
"jinja2: 2.8\n",
"boto: 2.39.0\n",
"pandas_datareader: 0.2.1\n"
]
}
],
"source": [
"pd.show_versions()"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"application/javascript": [
"\n",
" window.Urth = window.Urth || {};\n",
" Urth._initialized = Urth._initialized || $.Deferred();\n",
" Urth.whenReady = Urth.whenReady || function(cb) {\n",
" Urth._initialized.then(function() {\n",
" Urth.whenReady(cb);\n",
" });\n",
" };\n",
" Urth.whenReady(function() { console.log(\"Declarative widgets connected.\") });\n",
" "
],
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import declarativewidgets as declwidgets\n",
"declwidgets.init()"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<link rel=\"import\" href=\"urth_components/urth-viz-table/urth-viz-table.html\" is=\"urth-core-import\">\n",
"<link rel=\"import\" href=\"urth_components/juicy-html/juicy-html.html\" is=\"urth-core-import\" package=\"Juicy/juicy-html\">"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<link rel=\"import\" href=\"urth_components/urth-viz-table/urth-viz-table.html\" is=\"urth-core-import\">\n",
"<link rel=\"import\" href=\"urth_components/juicy-html/juicy-html.html\" is=\"urth-core-import\" package=\"Juicy/juicy-html\">"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"df1 = pd.DataFrame([[1,2],[3,4]], columns=['a','b'])\n",
"df1.columns.name = 'df1'"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>df1</th>\n",
" <th>a</th>\n",
" <th>b</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>1</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>3</td>\n",
" <td>4</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"df1 a b\n",
"0 1 2\n",
"1 3 4"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df1"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<template is=\"urth-core-bind\">\n",
" <urth-core-dataframe id='df1' ref=\"df1\" value=\"{{df1}}\" auto></urth-core-dataframe>\n",
" <urth-viz-table datarows=\"{{df1.data}}\" columns=\"{{df1.columns}}\" selection=\"{{sel1}}\" rows-visible=6>\n",
" </urth-viz-table>\n",
"</template>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%html\n",
"<template is=\"urth-core-bind\">\n",
" <urth-core-dataframe id='df1' ref=\"df1\" value=\"{{df1}}\" auto></urth-core-dataframe>\n",
" <urth-viz-table datarows=\"{{df1.data}}\" columns=\"{{df1.columns}}\" selection=\"{{sel1}}\" rows-visible=6>\n",
" </urth-viz-table>\n",
"</template>"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment