Hi, I am trying to run a python script and it returned the error below:
It looks like it points to a function that i have which merge 2 data frames together.
My code has no issue when not running in Alteryx. Is there something I need to install or upgrade in Alteryx?
Solved! Go to Solution.
Hello @micode ,
is the pandas function that you are using?
If so, can you check that you are using the same version between Alteryx and the code you run manually?
To know the version, run this code in the Python tool:
from ayx import Alteryx
import pandas as pd
print(pd.__version__)
The last official version is 0.25.2 and ALteryx one is 0.24.2, there should have been some improvment on this function between those versions.
If you need to install specific version, you can read this article: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/How-To-Use-Alteryx-installPackages-...
(If this post helps, then please consider it as the solution to help the other members find it more quickly).
I found out the reason why it does not allow me to use the merge function. The 2 fields i am joinning are different data type, one is str and another one is int. Although the fields that are joining together are the same data type, somehow Alteryx will not accept it and all the fields need to be the same data type.
So, since one of the field is STR, so I converted the "YEARWEEK" into STR as well. Now Alteryx has no issue at running the script.