Created
November 4, 2017 16:43
-
-
Save pomber/91f59d3d43c534df2fa6c83ecba27afa to your computer and use it in GitHub Desktop.
Jupyter notebook project folder structure
This file contains 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": "markdown", | |
"metadata": {}, | |
"source": [ | |
"```\n", | |
"project/\n", | |
"│ readme.md\n", | |
"│\n", | |
"└───input/\n", | |
"│ input.csv\n", | |
"│ \n", | |
"└───notebooks/\n", | |
"│ exploration.ipynb\n", | |
"│ \n", | |
"└───code/\n", | |
"│ __init__.py\n", | |
"│ utils.py\n", | |
"│ \n", | |
"└───data/\n", | |
" train.csv\n", | |
" test.csv\n", | |
"```" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"%load_ext autoreload\n", | |
"%autoreload 2\n", | |
"\n", | |
"import os\n", | |
"import sys\n", | |
"module_path = os.path.abspath(os.path.join('..', 'code'))\n", | |
"if module_path not in sys.path:\n", | |
" sys.path.append(module_path)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import utils # from project/code" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np \n", | |
"import pandas as pd \n", | |
"import matplotlib.pyplot as plt\n", | |
"%matplotlib inline\n", | |
"import seaborn as sns" | |
] | |
} | |
], | |
"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.6.0" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment