Replies: 1 comment
|
What has worked for me quite well in the past for pure numerical data (before we had buffer API support which probably simplifies this!) was:
The more modern way available since 3.11 is to use the buffer protocol: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I need to embed a C# library into Python. This C# library generates a data table, and my goal is to wrap it into a Python library that produces a DataFrame (e.g.,
pandas.DataFrame). Given that the data size can be large, I want to minimize overhead.Currently, I plan to implement a C# method that generates the data and then calls Python to construct the DataFrame and then return it. This method will be called from Python, creating a "sandwich" structure where Python calls C#, which in turn calls back into Python, in the same Python engine. I can do this by passing delegates to C# that wraps the DataFrame creation function. However, I'm not sure that this is the most efficient approach. What are your thoughts?
All reactions