question

Upvotes
Accepted
3 0 0 0

Snapping zero-values with the Python RDP library

I'm using the latest release of the RDP python library (1.0.0a7.post7), in particular the get_snapshot() function of the StreamingPrices class. If the value I'm snapping happens to be a float equal to zero (say a yield of 0%), the function get_snapshot() returns None. This is confusing since None is also returned if no value could be found.

Is it possible to make RDP return the value 0 instead of None when the field contains the value 0?

The issue seems to be caused by line 266 in StreamingPrices.py which treats non-existing fields the same way as fields with a value of 0: if _all_fields_value[name].get(f) else None

rdp-apirefinitiv-data-platform
icon clock
10 |1500

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

Upvotes
Accepted
20.3k 73 10 20

Hi @Sabina Tanase

Apologies - a misunderstanding.

I have been advised by the RD Library team that this bug has been fixed in refinitiv-dataplatform 1.0.0a8.post2 - which will be available soon on PyPi.

I will try and update once I know it is available.

icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @Sabina Tanase

Thanks for reporting this issue - I have passed it on to the RDP Python library dev team and will get back to you once I get a response / fix release details.

icon clock
10 |1500

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

chased the RDP team for an update again.

Upvotes
20.3k 73 10 20

Hi @Sabina Tanase

RDP team have advised that a fix for this should be in the end of Q1 release - no exact date yet.


icon clock
10 |1500

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

Click below to post an Idea Post Idea