Attribute error on my Jupyter Nootebook, but it runs in the virtual machine- Topic: Regular Expression Basics

Hi @Truth-O!

A lot of other learners have been confused by this one too. This post will shed some light on the matter.

The issue has to do with different versions of the Pandas library in your local machine vs on DQ’s platform.

1 Like

Thank you so much…this was really quick and helpful

1 Like

@Truth-O thank you for posting this question (and @blueberrypudding85 for your answer.). These have been very helpful.

I also had trouble with this and those links explained the issue fully to me. I went down a rabbit hole on this and am very happy to have sorted it out, I ‘lost’ a day but perhaps more accurately, spent a day studying up how to solve a problem.

I thought I would just add in the code to set up tag_5_matches with the correct parameter for using my Jupyter notebook.

tag_5_matches = tag_5.str.extract(pattern, expand=False)
print(tag_5_matches)

tag_5_freq = tag_5_matches.value_counts()
print(tag_5_freq)