Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
Question by igorg · Sep 04, 2020 at 02:48 PM · eikon data api

EIkon 1.1.4 is not backward compatible with 1.1.2

Another upgrade caused the problem with existing scripts. We've got 2 problems with existing scripts after 1.0.1. to 1.1.2 upgrade. Then we've got another problem after 1.1.2 -> 1.1.4 (1.1.5).

There is nothing on release notes page about the changes in 1.1.2. There is no release notes for 1.1.4 and 1.1.5 !

These issues makes us never upgrade the working modules at all.


Here is the problem I'm talking about :

dataFrame = ek.get_timeseries(rics='AC.MX', fields='*', start_date='2020-09-03T20:00:00', end_date='2020-09-03T20:10:00', interval='tick', normalize=False)


ricName = dataFrame.columns.name

ricName has RIC name value in 1.1.2. In 1.14 - it's nan.


This request returns the data in different formats using 1.1.2 and 1.1.4 Eikon python mode.

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.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by pierre.faurel · Sep 11, 2020 at 06:47 PM

ts[ric] works only for a multi ric timeseries

I tested different requests et checked dataframe structure with following code:

def get_ts(rics, fields):
  ts = rdp.get_timeseries(rics, fields, 
                          start_date='2020-09-03T20:00:00', 
                          end_date='2020-09-03T20:10:00',
                          interval='minute',
                          normalize=False, count=1)
  if hasattr(ts.columns, "name"):
    print("ts.columns.name: ", ts.columns.name)
  else:
    print("ts.columns.name: <No name>")
  print(ts)

1 RIC, N fields

=> ts.columns.name contains the ric name

get_ts(["MSFT.O"], '*')

Output:

ts.columns.name:  MSFT.O
MSFT.O                 HIGH     LOW    OPEN   CLOSE  COUNT  VOLUME
Date                                                               
2020-09-03 20:07:00  218.70  218.30  218.53  218.45    162   11654

N RIC, 1 field

=> ts.columns.name contains the field name

get_ts(["AAPL.O", "MSFT.O"], 'HIGH')

Output:

ts.columns.name:  HIGH
HIGH                 AAPL.O  MSFT.O 
Date                                
2020-09-03 20:07:00  127.67  218.70

N RIC, N fields

=> ts.columns.name contains "Security" label

get_ts(["AAPL.O", "MSFT.O"], ["HIGH", "LOW"])

Output:

ts.columns.name:  None 
Security             AAPL.O          MSFT.O         
Field                  HIGH     LOW    HIGH     LOW
Date                                                
2020-09-03 20:07:00  127.67  120.86  218.70  218.30
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 pierre.faurel · Sep 04, 2020 at 04:07 PM

Hi,

We apologize if these changes cause you any inconvenience.
We noticed your remark on release note and will improve this point

Rather than using dataFrame.columns.name property which is not standard in pandas (this property was added by eikon lib), we suggest to rely on your rics request parameter.
column names should only refer to related field names.

In last 1.1.4 and 1.1.5, changes were done to align with pandas standard output.

  • numpy.NaN value was change for pandas.NA
  • all values are converted to the most suitable type
    (in 1.1.2, all numeric values were converted in float64, other values like str keep object type)

As you'll see below, this impacts only empty data :

ts = ek.get_timeseries(rics='AC.MX', fields='*', start_date='2020-09-03T20:00:00', end_date='2020-09-03T20:10:00', interval='tick', normalize=False) print(ts) print(ts.dtypes)
1.1.2
AC.MX                VALUE   VOLUME
Date                               
2020-09-03 20:00:01    NaN   4400.0
2020-09-03 20:00:01    NaN   3720.0
2020-09-03 20:00:01    NaN   5814.0
2020-09-03 20:00:01    NaN   2494.0
2020-09-03 20:00:01    NaN   2507.0
2020-09-03 20:00:01    NaN    436.0
2020-09-03 20:00:01    NaN    356.0
2020-09-03 20:00:01    NaN  16933.0

AC.MX
VALUE     float64
VOLUME    float64
dtype: object

1.1.4
                     VALUE  VOLUME
Date                              
2020-09-03 20:00:01   <NA>    4400
2020-09-03 20:00:01   <NA>    3720
2020-09-03 20:00:01   <NA>    5814
2020-09-03 20:00:01   <NA>    2494
2020-09-03 20:00:01   <NA>    2507
2020-09-03 20:00:01   <NA>     436
2020-09-03 20:00:01   <NA>     356
2020-09-03 20:00:01   <NA>   16933

VALUE     Int64
VOLUME    Int64
dtype: object

1.1.5
                     VALUE  VOLUME
Date                              
2020-09-03 20:00:01   <NA>    4400
2020-09-03 20:00:01   <NA>    3720
2020-09-03 20:00:01   <NA>    5814
2020-09-03 20:00:01   <NA>    2494
2020-09-03 20:00:01   <NA>    2507
2020-09-03 20:00:01   <NA>     436
2020-09-03 20:00:01   <NA>     356
2020-09-03 20:00:01   <NA>   16933

VALUE     Int64
VOLUME    Int64
dtype: object

Comment

People who like this

0 Show 6 · 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
igorg · Sep 04, 2020 at 04:09 PM 0
Share

Do you see that 'AC.MX' in 1.1.2 printed results? It's missing in 1.1.4 and 1.1.5

avatar image
REFINITIV
pierre.faurel igorg · Sep 04, 2020 at 04:34 PM 0
Share

Yes, I see.
we're releasing a new version 1.1.6 and will restore it for your convenience.

avatar image
igorg pierre.faurel · Sep 04, 2020 at 04:44 PM 0
Share

This sounds great. Do you have an ETA for 1.1.6?

avatar image
igorg · Sep 04, 2020 at 05:34 PM 0
Share

About 'using dataFrame.columns.name' - yes, we rely on this field to get the RIC name. This was a workaround to solve the more general issue :

The response representation is not consistent and different for :

- if there are multiply rics received

- if there is 1 ric

- if there is 1 field requested and more than 1 ric returned


The representations of last 2 are similar , but for 3rd response instead of RIC , it has a field name.

I'm not a pro in python/pandas. But using common logic I do not understand why the data structure of the result depends on the number of requested RICs and fields. I would use the same data structure like there are multiple RICs and multiple fields.

avatar image
REFINITIV
Answer by pierre.faurel · Sep 11, 2020 at 04:10 PM

Hi,
eikon 1.1.6 was release on pypi.org

It contains a fix for the raised issue, but I remind that dataFrame.columns.name property is not a standard from pandas but 'added value' from eikon lib for timeseries on 1 RIC.

If you call any functions that modify the dataframe, you can loose name property.

And iIf you request a timeseries for list of rics, you don't have it but you can extract dataframe for each ric by this way:

ts = ek.get_timeseries(['AC.MX', 'MSFT.O'], ...)
ac_mx = ts['AC.MX']
msft = ts['MSFT.O']

(ts.columns is MultiIndex)

More generally, to get column names from a pandas.DataFrame is:

names = df.columns
print([name for name in ts.columns])
['VALUE', 'VOLUME']


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
igorg · Sep 11, 2020 at 04:22 PM 0
Share

Hi,

Thanks for the update. You also used that 'added field' in case I request 1 field only. Was it removed as well? That added value had a field name.

Another question is why do you use different dataframe structure if there is only 1 RIC requested?

This does not work :

ts = ek.get_timeseries(['AC.MX'], ...)
ac_mx = ts['AC.MX]


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 >
10 People are following this question.

Related Questions

How can i make a distinction between remind news and others when i using EIKON DATA API(get_news_headlines)?

Data point limit for get_data and get_timeseries?

Code 500 Internal Server Error

[Python API] How to fuzzy search for companies by name ?

"Access Denied" for Nasdaq Rics even though permissioned on Eikon

  • 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