book
Article ID: KB0070584
calendar_today
Updated On:
Description
Statistica has great integration with R and Python. We can achieve Sentiment Intensity Analysis in Statistica using R and Python packages. We have attached an example workspace in this article.
If you encounter the "AttributeError: 'DataFrame' object has no attribute 'append' error" while running the workspace, please follow the steps described in this article.
This knowledge base article addresses these issues:
1. While running the attached workspace in Statistica 14.0.1, 14.0.0, if you encounter an "append" error, as below:
2. Or the node keeps running for an indefinite time.
Know cause: The reason behind the "append" error was Pandas lib (version >2.0) deprecated the method `append()` that is being used in the file `PyWrapper.py`
Resolution
The simple workaround is downgrading the Pandas to 1.x.x and downloading the nltk package by following the steps below:
1. Open the command prompt and run:
- pip list //shows all the libraries with the version
- pip uninstall pandas
- pip install pandas==1.3.5
You will need to install the nltk (Natural Language Toolkit) processing package by using the following command:
-
pip install nltk
When you first run the workspace, you will need to download the mentioned datasets.
- import nltk
- nltk.download('vader_lexicon')
- nltk.download('movie_reviews')
- nltk.download('punkt')
NOTE: Customer should use V14.0.1 + HF08 or V14.1
Issue/Introduction
This article demonstrate the steps to run the "Sentiment_Analysis_Examples.sdm" workspace without any errors.