Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Merge function error while running a python script

micode
6 - Meteoroid

 

Hi, I am trying to run a python script and it returned the error below:

micode_0-1577729859057.png

It looks like it points to a function that i have which merge 2 data frames together.

micode_1-1577729992725.png

 

My code has no issue when not running in Alteryx. Is there something I need to install or upgrade in Alteryx? 

 

2 REPLIES 2
WilliamR
Alteryx
Alteryx

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). 

micode
6 - Meteoroid

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. 

Labels
Top Solution Authors