Skip to content

Commit

Permalink
fixed Surprise (%)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjlgood committed Dec 5, 2024
1 parent 7b81e13 commit c29b13a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,12 +622,12 @@ def get_earnings_dates(self, limit=12, proxy=None, add_cookies=None) -> Optional
dates = dates.drop(["Symbol", "Company"], axis=1)

# Convert types
for cn in ["EPS Estimate", "Reported EPS", "Surprise(%)"]:
for cn in ["EPS Estimate", "Reported EPS", "Surprise (%)"]:
dates.loc[dates[cn] == '-', cn] = float("nan")
dates[cn] = dates[cn].astype(float)

# Convert % to range 0->1:
dates["Surprise(%)"] *= 0.01
dates["Surprise (%)"] *= 0.01

# Parse earnings date string
cn = "Earnings Date"
Expand Down

0 comments on commit c29b13a

Please sign in to comment.