Skip to content

Instantly share code, notes, and snippets.

@jbwhit
Created April 21, 2024 21:57
Show Gist options
  • Save jbwhit/1d6f5e8a1ab694042dc0cc8a726d4e5f to your computer and use it in GitHub Desktop.
Save jbwhit/1d6f5e8a1ab694042dc0cc8a726d4e5f to your computer and use it in GitHub Desktop.
%load_ext autoreload
%autoreload 1
%config InlineBackend.figure_format = 'retina'
%load_ext rich
import datetime
import hashlib
import json
import os
import re
import sys
import time
import warnings
import ipywidgets as widgets
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pyarrow as pa
import pandas as pd
import requests
import seaborn as sns
from IPython.display import Markdown, display
from matplotlib.ticker import FuncFormatter
from pandas.plotting import register_matplotlib_converters
from ydata_profiling import ProfileReport
register_matplotlib_converters()
sns.set()
sns.set_context("notebook")
plt.rcParams["figure.figsize"] = 10, 6
pd.options.display.max_columns = None
pd.options.display.max_rows = None
pd.options.display.precision = 4
warnings.simplefilter(action="ignore", category=FutureWarning)
dollar_formatter = FuncFormatter(lambda x, pos: f"${x:,.0f}")
thousands_formatter = FuncFormatter(lambda x, pos: f"{x:,.0f}")
string_pa = pd.ArrowDtype(pa.string())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment