question

Upvotes
Accepted
27 0 0 2

How do I get the curve data without headers -RDMS Python scripts

How do I get the curve data without headers- for Python Scripts

The data comes across as a json object but was wondering how to receive the data straight as a numpy array?

#technologypython apirdms
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
14.1k 30 5 10

Hi @vinaya.shetty0 ,

From the JSON result returned from RDMS, it can be tranformed to numpy array with the Pandas DataFrame constructor as below

import pandas as pd
pd.DataFrame(d).values

The .values part on the end converts the result to a NumPy array, which is what you asked for. Some people would just work directly with the DataFrame instead.

1705907805083.png


1705907805083.png (123.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.