question

Elise avatar image
0 Likes"
Elise asked Jacob W2 commented

something wrong on data type when call python function

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.

FlexSim 24.0.4
flexsim python
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jacob W2 avatar image Jacob W2 ♦ commented ·

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 0 ·

0 Answers