################################################################################
# autoreload all modules every time before executing the Python code
%reload_ext autoreload
%autoreload 2
################################################################################
from IPython.core.interactiveshell import InteractiveShell
# `ast_node_interactivity` is a setting that determines how the return value of the last line in a cell is displayed
# with `last_expr_or_assign`, the return value of the last expression is displayed unless it is assigned to a variable
= "last_expr_or_assign"
InteractiveShell.ast_node_interactivity
################################################################################
import pandas as pd
# `copy_on_write` is a performance improvement
# This will be the default in a future version of pandas
# Refer to https://pandas.pydata.org/pandas-docs/stable/user_guide/copy_on_write.html
= True
pd.options.mode.copy_on_write
################################################################################
%matplotlib inline
import matplotlib as mpl
# `constrained_layout` helps avoid overlapping elements
# Refer to https://matplotlib.org/stable/tutorials/intermediate/constrainedlayout_guide.html
'figure.constrained_layout.use'] = True mpl.pyplot.rcParams[
Jupyter prelude
Keywords
python, ibis, pandas, matplotlib, jupyter
uv
# This will create a new Python environment in the current directory
uv init --app
# This will add the specified packages to the environment
uv add "ibis-framework[duckdb,geospatial]" ipykernel panel hvplot holoviews matplotlib pandas param lonboard folium
prelude
Reuse
Citation
BibTeX citation:
@online{krishnamurthy2024,
author = {Krishnamurthy, Dheepak},
title = {Jupyter Prelude},
date = {2024-12-16},
url = {https://kdheepak.com/blog/jupyter-prelude/},
langid = {en}
}
For attribution, please cite this work as:
D.
Krishnamurthy, “Jupyter prelude,” Dec. 16, 2024. https://kdheepak.com/blog/jupyter-prelude/.