Skip to content

Commit

Permalink
Merge pull request #1810 from Tejasweee/dev
Browse files Browse the repository at this point in the history
make nan as float
  • Loading branch information
ValueRaider committed Dec 31, 2023
2 parents d1a34a4 + c1ad258 commit 5195c3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2167,7 +2167,7 @@ def get_earnings_dates(self, limit=12, proxy=None) -> Optional[pd.DataFrame]:

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

# Convert % to range 0->1:
Expand Down

0 comments on commit 5195c3a

Please sign in to comment.