Skip to content

Instantly share code, notes, and snippets.

Created August 20, 2016 15:26
Show Gist options
  • Save anonymous/83c7cf1459552d89b8667a9a0be33e8c to your computer and use it in GitHub Desktop.
Save anonymous/83c7cf1459552d89b8667a9a0be33e8c to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"size = 1000\n",
"x = np.random.normal(size=size)\n",
"y = x + np.random.normal(size=size)\n",
"z = y + np.random.normal(size=size)\n",
"X = pd.DataFrame({'x': x, 'y': y, 'z': z})"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>x</th>\n",
" <th>y</th>\n",
" <th>z</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>-0.078186</td>\n",
" <td>-0.578115</td>\n",
" <td>-0.892278</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.129325</td>\n",
" <td>1.005127</td>\n",
" <td>-0.894835</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>2.440264</td>\n",
" <td>2.034245</td>\n",
" <td>2.362531</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.714965</td>\n",
" <td>0.943958</td>\n",
" <td>0.525021</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.664560</td>\n",
" <td>-1.410155</td>\n",
" <td>-0.845570</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" x y z\n",
"0 -0.078186 -0.578115 -0.892278\n",
"1 0.129325 1.005127 -0.894835\n",
"2 2.440264 2.034245 2.362531\n",
"3 0.714965 0.943958 0.525021\n",
"4 0.664560 -1.410155 -0.845570"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"X.head()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment