For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi,
I see a warning when using Eikon's Python API package (eikon). The commands I ran were:
The warning message I see is:
C:\Users\kengwong\KOminiconda3\envs\brk\lib\site-packages\eikon\data_grid.py:247: FutureWarning: The pandas.np module is deprecated and will be removed from pandas in a future version. Import numpy directly instead data = pd.np.array([[get_data_value(value) for value in row] for row in data_dict['data']])
This is not an error, it looks more like a warning.
Cheers,
Keng Onn
Thank you so much for the information.
Refer to Pandas: What’s new in 1.0.0 (January 29, 2020), it indicates that the pandas.np submodule is now deprecated.
However, Eikon Data APIs python still uses pd.np. Eikon Data APIs library requires pandas>=0.17.0.
I will report this problem to the product team for consideration.
There is no update from the product team.
However, from my testing, the data can be retrieved properly although it reports the warning messages.
Otherwise, you may need to use pandas < 1.0.0 instead.
Pandas is now using SemVer so pd.np should be available through pandas 2.0.0 without code breakage (deprecations introduced in the 1.x series will no longer be removed until 2.x). Realistically it will probably last at least a year.
That said, referencing pd.np was never good design practice. Pandas's internal import of numpy accidentally made it into the public pandas namespace but wasn't supposed to be used. This should be fixed in the eikon code to import numpy as np directly.