Last active
October 5, 2018 00:04
-
-
Save gangtao/b425c0ad640ca7ef3efe37a135ca228f to your computer and use it in GitHub Desktop.
Facet Jupyter Notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"features = [\"Age\", \"Workclass\", \"fnlwgt\", \"Education\", \"Education-Num\", \"Marital Status\",\n", | |
" \"Occupation\", \"Relationship\", \"Race\", \"Sex\", \"Capital Gain\", \"Capital Loss\",\n", | |
" \"Hours per week\", \"Country\", \"Target\"]\n", | |
"train_data = pd.read_csv(\n", | |
" \"https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.data\",\n", | |
" names=features,\n", | |
" sep=r'\\s*,\\s*',\n", | |
" engine='python',\n", | |
" na_values=\"?\")\n", | |
"test_data = pd.read_csv(\n", | |
" \"https://archive.ics.uci.edu/ml/machine-learning-databases/adult/adult.test\",\n", | |
" names=features,\n", | |
" sep=r'\\s*,\\s*',\n", | |
" skiprows=[0],\n", | |
" engine='python',\n", | |
" na_values=\"?\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<link rel=\"import\" href=\"https://raw.githubusercontent.com/PAIR-code/facets/master/facets-dist/facets-jupyter.html\">\n", | |
" <facets-dive id=\"elem\" height=\"600\"></facets-dive>\n", | |
" <script>\n", |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment