Maybe it's the other way, that Python is expecting a string to be passed in.
Try changing your line # 5 to one of the following and maybe it will work, TabPy expects parameters to be passed in via _arg1, _arg2, etc.
Really appreciate your effort, Jeff.
I tried your approaches, but unfortunately, they are throwing the same error.
Just wanted to clarify something, suppose i have a text field, having 10 words in it, my output should now become 10 rows with each keyword by its side. is this possible in Tableau?
for e.g. if my data is
text field Tableau is awesome
my python tokenizer should create this output:
Col1 Col2 New Calc
text field Tableau is awesome Tableau
text field Tableau is awesome is
text field Tableau is awesome awesome
Essentially data will explode, and I am looking to get a counter of each word for my analysis.
Sounds crazy, i know! there should be a much easier way of doing this. Any suggestion is more than welcome!
I think it's possible. Do you happen to have a sample workbook that I can play with? And what Python libraries are needed?
Sure, Jeff.Attaching my workbook for you to explore.
Here are the libraries that i am using: for sentiment score - from nltk.sentiment import SentimentIntensityAnalyzer for tokenization- from nltk.tokenize import word_tokenize Would love to see your approach! All the best
for tokenization- from nltk.tokenize import word_tokenize (tokenizer is the one that is not working)
for sentiment score - from nltk.sentiment import SentimentIntensityAnalyzer ( this worksheet is working fine)
Would love to see your approach!
test.twbx 20.9 KB
Sure Jeff. Normally i use nltk.download() and then a pop up comes up. Here i installed all the packages that are relying on it.
if this doesnt work, you can also check the command line installation as mentioned in the link below:https://www.nltk.org/data.html
Hope this helps!