You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement the python equivalent of the excel command, BDP("SPX Index", "RT_PX_CHG_PCT_1D") but I see NaN. Anyone knows how to fix this?
Here is how I am using it in my python code. I have a dataframe, df that holds indexes like SPX Index, etc. I use the get_reference_data() method to retrieve real time %age change of price but I get NaN:
I believe you need to pass the IDs as a list. I am assuming that your
df.index is a variety of BBG tickers. I would try your code using 'SPX
Index' to see if it works as expected. If so, then it is very likely how
you are passing the tickers. Depending on what your index looks like you
can try list(df.index) or similar.
On Fri, 23 Aug 2019, 16:43 viphilar, ***@***.***> wrote:
I am trying to implement the python equivalent of the excel command,
BDP("SPX Index", "RT_PX_CHG_PCT_1D") but I see NaN. Anyone knows how to fix
this?
Here is how I am using it in my python code. I have a dataframe, df that
holds indexes like SPX Index, etc. I use the get_reference_data() method to
retrieve real time %age change of price but I get NaN:
temp = LocalTerminal.get_reference_data(df['Index'], ['RT_PX_CHG_PCT_1D'],
ignore_field_error=1, ignore_security_error=1)
newDf = temp.as_frame()
My output is:
RT_PX_CHG_PCT_1D
SPX Index NaN
Any thoughts?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55?email_source=notifications&email_token=AGL2ISD4O4T6TJIZU3VSOCTQGAATJA5CNFSM4IPA7FOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHCLBLQ>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AGL2ISDKZLE6FTXIBUT6263QGAATJANCNFSM4IPA7FOA>
.
I am trying to implement the python equivalent of the excel command, BDP("SPX Index", "RT_PX_CHG_PCT_1D") but I see NaN. Anyone knows how to fix this?
Here is how I am using it in my python code. I have a dataframe, df that holds indexes like SPX Index, etc. I use the get_reference_data() method to retrieve real time %age change of price but I get NaN:
temp = LocalTerminal.get_reference_data(df['Index'], ['RT_PX_CHG_PCT_1D'], ignore_field_error=1, ignore_security_error=1)
newDf = temp.as_frame()
My output is:
SPX Index NaN
Any thoughts?
The text was updated successfully, but these errors were encountered: