Worked! Only had to make small change to add a space between each join: ' '.join([s["text"] for s in group]) ' '.join([s["text"] for s in group]) I also told ChatGPT about the change. Video is "Making Friends with Machine Learning: Regression" by Cassie Kozyrkov