Accessing Pandas library using IronPython

会有一股神秘感。 提交于 2019-12-18 05:09:23

问题


I aim to connect Python to .NET for a process. I am using IronPython for it. The part in Python involves some calculations for which I use the Pandas library.

Is there a way to connect IronPython and Pandas?

I see using IronPython, I can access all the basic Python functionalities. How to extend this generally to access third party functionalities/packages (like Pandas here)?


回答1:


Short answer: No. Longer answer: As far as I am aware tere is no way to integrate C-libraries with IronPython in the default python way. Since pandas / numpy use a heavy dose of c code, that is a showstopper.

We use Python.net for this task - basically we embed an python interpreter in .NET and retrieve the results of our computations. That works well and avoids the problems which arise due to IronPython. Furthermore, the "hosted" python process is 100% native, so no library problems should arise. There can be some problems with subprocesses, since the process is a daemon, but they can be circumvented.



来源:https://stackoverflow.com/questions/36641557/accessing-pandas-library-using-ironpython

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!