Sometimes you want to add labels to a dataset. There are plenty of great labelling tools out there but sometimes you only need something simple from Jupyter. If that sounds familiar you'll want to check out pigeon.
You can also annotate a dataframe. To run the code, remember to first run install the dependency for the dataset.
python -m pip install scikit-lego
Once the dataset is available you can run the code below.
from IPython.display import display from sklego.datasets import load_penguins from pigeon import annotate df = load_penguins(as_frame=True).drop(columns=["species"]) # Again note the clever use of the `display_fn`. annotations = annotate( [1, 2, 3, 4, 5, 6], options=['A', 'B', 'C'], display_fn=lambda x: display(df.iloc[x-1:x]) )
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider signing up for the newsletter.