Skip to content

Commit

Permalink
Fixed elementwise comparison` warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Oct 29, 2019
1 parent 4035fe5 commit f8ddb48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ def _get_fundamentals(self, kind=None, proxy=None):
def cleanup(data):
df = _pd.DataFrame(data).drop(columns=['maxAge'])
for col in df.columns:
df[col] = _np.where(df[col] == '-', _np.nan, df[col])
df[col] = _np.where(
df[col].astype(str) == '-', _np.nan, df[col])

df.set_index('endDate', inplace=True)
df.index = _pd.to_datetime(df.index, unit='s')
Expand Down

0 comments on commit f8ddb48

Please sign in to comment.