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!