serhii.net

In the middle of the desert you can say anything you want

11 Jan 2024

Yet another jupyter pandas template thing

from pathlib import Path

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt

INTERACTIVE_TABLES=False
USE_BLACK = True

# 100% width table
from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

if INTERACTIVE_TABLES:
	from itables import init_notebook_mode
	init_notebook_mode(all_interactive=True, connected=True)

# black formatting
if USE_BLACK:
	%load_ext jupyter_black

# column/row limits removal
pd.set_option("display.max_columns", None)
pd.set_option('display.max_rows', 100)

# figsize is figsize
plt.rcParams["figure.figsize"] = (6, 8)
plt.rcParams["figure.dpi"] = 100

# CHANGEME
PATH_STR = "xxxxx/home/sh/hsa/plants/inat500k/gbif.metadata.csv"

PATH = Path(PATH_STR)
assert PATH.exists()
Nel mezzo del deserto posso dire tutto quello che voglio.