Last active
December 8, 2018 20:54
-
-
Save yang-zhang/ae8905f9c03b2ffa5120b6e634ed36a3 to your computer and use it in GitHub Desktop.
Common commands to add to top of jupyter notebooks
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
%load_ext autoreload | |
%autoreload 2 | |
%matplotlib inline | |
%config InlineBackend.figure_format = 'retina' | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
pd.set_option('max_colwidth',500) | |
from pathlib import Path | |
from collections import defaultdict, Counter | |
import pdb | |
import datetime | |
from tqdm import tqdm_notebook as tqdm | |
import pickle | |
import seaborn as sns | |
from IPython.display import display, Image as IImage | |
import sys, os, shutil | |
import json | |
pd.set_option('display.max_rows', 500) | |
pd.set_option('display.max_columns', 500) | |
pd.set_option('display.width', 1000) | |
pd.set_option('display.max_colwidth', -1) | |
def show_dct(dct, n=3): | |
return list(dct.items())[:n] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment