Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Refinitiv Data Platform /
  • Refinitiv Data Platform Libraries /
avatar image
Question by michaelberk99 · Apr 09, 2020 at 08:04 PM · python api eikonpandasdeprecatednumpy

Pandas.np depreciation warning

Hi. I am getting the following warning and wanted to bring it your attention. Will this be fixed in future iterations of the API?


/Library/Python/3.7/site-packages/eikon/time_series.py:209: FutureWarning:=

The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

7 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by umer.nalla · Apr 14, 2020 at 11:07 AM

Hi @michaelberk99 and @JIAN.DU

I have been advised by the developers that this issue will be resolved in future releases of the RDP library and the Eikon Data API.

Indeed the alpha version 1.1.3a0 of the Python Eikon Data API already has this issue fixed. I do not recommend using the Alpha version for any production implementations.

Comment
michaelberk99

People who like this

1 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
JIAN.DU · Jul 15, 2020 at 01:23 PM 0
Share

Hi Umer - thank you for your reply. I see you mentioned the eikon library, however I was referring to https://pypi.org/project/refinitiv-dataplatform/#description.

Would you happen to know when this will be applied to the library?

avatar image
REFINITIV
umer.nalla ♦♦ JIAN.DU · Jul 15, 2020 at 01:35 PM 0
Share

Hi @JIAN.DU

Indeed the same changes are being applied to the RDP library as well - in time RDP library and Eikon library will be the one library.

I can confirm that I am using an internal test RDP version and the pandas warning no longer exists.

I have not yet upgraded to the latest test version - but as its a later version it should also include this fix - https://test.pypi.org/project/refinitiv-dataplatform/

NOTE: If you do decide to try the test version, I would not recommend using it for any current production/critical usage until you have tested and satisfied yourself it is stable enough.

avatar image
REFINITIV
Answer by Gurpreet · Apr 10, 2020 at 01:36 PM

@michaelberk99, What version of Eikon module are you running. I have the latest version, and don't numpy imported as such or get this error on get_timeseries API call.


>>> ek.__version__
'1.1.2'
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by JIAN.DU · Apr 11, 2020 at 04:48 PM

The RDP APIs refinitiv.dataplatform library - 1.0.0a0 (https://pypi.org/project/refinitiv-dataplatform/#description) currently have this warning. Is the RDP library on Github or similar? Happy to help.

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Gurpreet · Apr 13, 2020 at 12:58 PM

You will have to be more specific - The error message in your original post is showing Eikon Data API, but the link is to RDP library. Both of which are different products.

Can you please show how I can replicate this error message - the code snippet etc. Also what is your Eikon and RDP library version number?

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
JIAN.DU · Apr 13, 2020 at 01:34 PM 0
Share

In my case, I am referring to refinitiv.dataplatform (RDP library, not Eikon), but the underlying issue is the same. My RDP library is above, the latest on pip. There are references to pandas.np, whereby should import numpy directly.


You will get the warning when you import the (RDP) library.

avatar image
REFINITIV
Answer by Gurpreet · Apr 13, 2020 at 01:54 PM

Thanks for the information, but I am still unable to reproduce your error. Can you point to the actual file within the package which imports numpy from pandas.

(rdp) C> pip list | grep -i refinitiv
refinitiv-dataplatform 1.0.0a0

(rdp) C> python
Python 3.6.2 |Continuum Analytics, Inc.| (default, Jul 20 2017, 12:30:02) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import refinitiv.dataplatform as rdp
>>>
>>> rdp.__version__
'1.0.0-alpha'
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
Answer by JIAN.DU · Apr 13, 2020 at 05:00 PM
>>> import refinitiv.dataplatform <path>\lib\site-packages\refinitiv\dataplatform\pricing\pricing_.py:8: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead from pandas import np
>>> refinitiv.dataplatform.__version__ '1.0.0-alpha'


I am on pandas 1.0.3.

numpy==1.18.2

pandas==1.0.3


Depreciating pandas.np and pandas.datetime, is intentional. (see: https://github.com/pandas-dev/pandas/issues/30296 ) I think the warnings are from 1.0.x onwards from start of this year.


There are numerous functions still referencing pandas.np


So while the RDP library works (just shows warning) it is recommended to update and import numpy explicitly for future compatibility.


pandasnp.png (53.0 KiB)
Comment
michaelberk99

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by Gurpreet · Apr 13, 2020 at 05:16 PM

Thanks, I will pass this information to the developers.

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
JIAN.DU · Jul 15, 2020 at 01:17 PM 0
Share

Any update to this please?

avatar image
aNadjalin JIAN.DU · Aug 06, 2020 at 08:28 AM 0
Share

Hello,

I'm getting this message as well from the Eikon API version 1.1.2. Is there a projected date for an API update resolving the deprecation issue?

Thank you!

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
13 People are following this question.
  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges