something wrong on data type when call python function

something wrong on data type when call python function

eliset
Not applicable
513 Views
1 Reply
Message 1 of 2

something wrong on data type when call python function

eliset
Not applicable

[ FlexSim 24.0.4 ]

I create a python function, which need a parameter 'col'. This function will return 'qty' from pandas dataFrame structure.

screenshot-2024-12-31-102601.pngwhen I set up everything well in FlexSim, and call the function, print the result, output console shows NULL, system console shows 2.0.

screenshot-2024-12-31-104802.png


Then I tried many methods, I found it seems the data 'col' sent to python is recognized as dataType float64. Then I use int() and float() to change the data type, it works well. output console is correctscreenshot-2024-12-31-104511.png


screenshot-2024-12-31-104855.png

I am working on a complex python function to prepare a dictionary for Flexsim global table. So for the data I want send to FlexSim, I have to use float(). it is so inconvenient. Hope get a better idea about this.

0 Likes
514 Views
1 Reply
Reply (1)
Message 2 of 2

Jacob_White
Community Manager
Community Manager

Hi @Elise,

Thank you for contributing to our community! We couldn't identify a maintained license or subscription linked to your account.

You may need to update your profile information to identify yourself as a license owner or their associate. Check out our article for how to ensure you receive timely support. If you update your profile comment back to let us know - we'll adjust the priority of your post accordingly.

If your current license is expired, please contact your local distributor to renew.

0 Likes