-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieve the next earnings date for a ticker but did receive a float not a date #18
Comments
Sure, so that number is a Unix/Epoch time. You can convert it to a datetime using the _, df = Query().select('price', 'earnings_release_date').get_scanner_data()
df['earnings_release_date'] = df['earnings_release_date'].map(dt.datetime.utcfromtimestamp, na_action='ignore')
>>> df
|
Good catch. Glad you got it working now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My idea was to retrieve the next earnings date for a ticker so I checked your code and I think I found the corresponding column to use.
So I tried the customer screener with this query:
Python code used:
tmp = (Query()
.select('name', 'earnings_release_date','Recent Earnings Date','earnings_release_next_date')
.get_scanner_data())
df = tmp[1]
df[df.name == 'PFE']['earnings_release_next_date']
but getting floats instead of dates:
48 NYSE:PFE PFE 1.706615e+09 1.706615e+09 1.714478e+09
Can you please help/fix?
The text was updated successfully, but these errors were encountered: