Start your journey with Alteryx Machine Learning - Take our Interactive Lesson today!

Alteryx Machine Learning Discussions

Find answers, ask questions, and share expertise about Alteryx Machine Learning.
Getting Started

Start your learning journey with Alteryx Machine Learning Interactive Lessons

Go to Lessons

Syntax Error in Python Tool in Alteryx (One Way Anova Code)

Shaina1
8 - Asteroid

Hey-I'm a complete newbie to using Python-was attempting to use it within Alteryx-I have a dataset which looks like this, and I'm trying to use the following code using python tool in alteryx-attaching screenshot for reference-I'm getting invalid syntax traceback error-attaching code for reference. Can anyone guide on this please ?

I followed the below link for writing the code-used the statsmodels for it.

https://www.pythonfordatascience.org/anova-python/

 

 

1 REPLY 1
mpizzorusso
7 - Meteor

This issue is more with the syntax of your Python code than anything to do with Alteryx. It appears that the error is related to your column names containing spaces. You can use a Dynamic Rename tool beforehand to replace spaces in column names with underscores. See below:

 

Column Name Remove Spaces.JPG