Can we load a pandas DataFrame in .NET space using iron python? If not I am thinking of converting pandas df into a csv file and then reading in .net space.
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Generic Generics in Managed C++
- Evil ctypes hack in python
Regarding the option including serialization:
I'm still investigating similar case - we want to process the data in python and then use the results in c#. Our requirement was to (preferably) keep the python part platform independent so that we can run our number crunching on either linux or windows. Long story short we decided to use binary serialization/deserialization with Message Pack: http://msgpack.org/index.html
We convert the DataFrame values to list, and serialize to file:
Then on the C# side we use the .net implementation of MessagePack to deserialize the data:
Main advantages of binary serialization:
It is possible to call CPython from .NET using Python.NET:
https://github.com/pythonnet/pythonnet/tree/develop
No, Pandas is pretty well tied to CPython. Like you said, your best bet is to do the analysis in CPython with Pandas and export the result to CSV.