In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

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