Panda series being seen as a dataframe?

Hey all! I am really confounded by this and can use your help. This is based on the capturing groups section in the Regular Expression Basics unit.

I typically take what I learn and basically reproduce it in a Jupyter notebook. This is almost never an issue. However, I am having an issue and can’t figure it out. The code works in the DataQuest GUI, but not in Jupyter.

This is what is running in DataQuest, but not in Jupyter:

import pandas as pd

pattern = r"\[(\w+)\]"


When I run this in Jupyter, I keep getting:

AttributeError: ‘Dataframe’ object has no attribute ‘value_counts’

In Jupyter, I verified that title is recognized as a series object. So, I know it’s not that.

I feel like I am missing something really obvious.

Thanks for your help!


This post will explain what the issue is. A number of other learners have been bamboozled by this matter before!