Question: How to fix these erros coming up with this script please? c: Users User Downloads ew . py: 1 2 : DtypeWarning:

How to fix these erros coming up with this script please?
c:\Users\User\Downloads
ew.py:12: DtypeWarning: Columns (1,10) have mixed types. Specify dtype option on import or set low_memory=False.
dataframe = pd.read_csv(r"C:\Users\User\OneDrive\Desktop\1429_1.csv")
Traceback (most recent call last):
File "c:\Users\User\Downloads
ew.py", line 51, in
test_sentiment_analysis(sample_review_1)
File "c:\Users\User\Downloads
ew.py", line 42, in test_sentiment_analysis
sentiment_result = analyze_sentiment(review)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\User\Downloads
ew.py", line 32, in analyze_sentiment
sentiment = doc._.sentiment.polarity
^^^^^^^^^^^^^^^
File "C:\Users\User\AppData\Local\Programs\Python\Python312\Lib\site-packages\spacy\tokens\underscore.py", line 48, in __getattr__
raise AttributeError(Errors.E046.format(name=name))
AttributeError: [E046] Can't retrieve unregistered extension attribute 'sentiment'. Did you forget to call the `set_extension` method?
 How to fix these erros coming up with this script please?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!