Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
764 views
in Technique[技术] by (71.8m points)

python 2.7 - Accessing Pandas library using IronPython

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...