File to automatically import in a Jupyter Notebook session to get to work quickly
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
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import pandas as pd | |
import seaborn as sns | |
from IPython.display import display | |
from IPython import get_ipython | |
from sqlalchemy import create_engine | |
from itertools import combinations, product, chain | |
from functools import partial | |
import fitz | |
import re | |
from tqdm import tqdm_notebook as progress | |
pd.options.display.float_format = "{:,.0f}".format | |
DB = create_engine('mssql://Senegal').raw_connection() | |
sql = partial(pd.read_sql, con=DB) | |
sql_exec = lambda x: pd.io.sql.execute(x, con=DB).commit() | |
try: | |
ipython = get_ipython() | |
ipython.magic("matplotlib inline") | |
except: | |
pass | |
plt.style.use('ggplot') | |
def figsize(*args): | |
plt.rcParams['figure.figsize'] = args | |
figsize(16, 8) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment