Skip to content

Instantly share code, notes, and snippets.

@alexander-wei
alexander-wei / ingest.py
Created December 31, 2023 00:33
RBM Ingredients Pipeline
from pandas import DataFrame as pdf, Series
from tqdm.auto import tqdm
from random import sample, randint
from ast import literal_eval
class DataFrame(pdf):
"""DataFrame structure for loading ingredient lists from the Food.com dataset
Extends pandas.DataFrame
Implements preprocess(), collect_first_words() methods for parsing raw ingredient data
"""