FutureWarning for data_grid.py (pandas.np module is deprecated and will be removed... import nump...

...y directly instead) when using Eikon Python API

Hi,

I see a warning when using Eikon's Python API package (eikon). The commands I ran were:

  1. import eikon as ek
  2. ek.set_app_key('....')
  3. df2, err = ek.get_data(['RIC_1', 'RIC_2' ...], ['TRD_STATUS'])

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

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @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.

    image

    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.

Answers