I have a .NET assembly created by our software group that is returning numerical data of the type System.Double[].
What is the appropriate way to convert this into a Python type (list?) so I can create a dict from it?
Ben
My suggestion would be to loop through the object row by row and append to the list.
So if your System.Double[] object is called myData, create a new list called myData_list, loop through myData and append to the list row by row. Try the example below. You can then convert the list into a df and plot it however you see fit.
myData_list = []
for row in myData:
myData_list.append(row)
or using List comprehension:
myData_list = [row for row in myData]
I use this method in my application. I am using python net to access the methods in a windows .dll file and this is how I have been able to access the data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With