Not able to get EPS1MN for a list of stocks.

Hemant
Hemant Newcomer

I am using the following formula :
df = ds.get_data(tickers=["IBM.N","MSFT.O","GOOG.O"'],
fields = ["EPS1MN"],
kind=1,
freq='M',
start="-4M")

The above isnt working for me. Could u please point out the exact issues?
Also What does kind specify?
I have in total 3000 stocks for which I want to pull this data.

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @Hemant

    Thank you for reaching out to us.

    The tickers requires a comma separated string. Those items are RICs. Each RIC must be enclosed with angle brackets. Therefore, the code should look like this:

    df = ds.get_data(
        tickers="<IBM.N>,<MSFT.O>,<GOOG.O>",
        fields = ["EPS1MN"],
        kind=1, 
        freq='M',
        start="-4M")
    df
    
    
  • Hemant
    Hemant Newcomer

    Thanks @Jirapongse .
    It worked, What does kind mean?
    Also is there an option of transpose here?

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    kind = 0 is a snapshot while kind = 1 is timeseries.

    There is no option for transpose so you can transpose by using the pandas library.