Skip to content

Commit

Permalink
pep stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
ranaroussi committed Jul 3, 2021
1 parent 8b1f586 commit 56d6267
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ def cleanup(data):
except Exception as e:
holders = []

if len(holders)>=3:
if len(holders) >= 3:
self._major_holders = holders[0]
self._institutional_holders = holders[1]
self._mutualfund_holders = holders[2]
elif len(holders)>=2:
elif len(holders) >= 2:
self._major_holders = holders[0]
self._institutional_holders = holders[1]
elif len(holders)>=1:
elif len(holders) >= 1:
self._major_holders = holders[0]

#self._major_holders = holders[0]
Expand All @@ -318,18 +318,18 @@ def cleanup(data):
if self._institutional_holders is not None:
if 'Date Reported' in self._institutional_holders:
self._institutional_holders['Date Reported'] = _pd.to_datetime(
self._institutional_holders['Date Reported'])
self._institutional_holders['Date Reported'])
if '% Out' in self._institutional_holders:
self._institutional_holders['% Out'] = self._institutional_holders[
'% Out'].str.replace('%', '').astype(float)/100
'% Out'].str.replace('%', '').astype(float)/100

if self._mutualfund_holders is not None:
if 'Date Reported' in self._mutualfund_holders:
self._mutualfund_holders['Date Reported'] = _pd.to_datetime(
self._mutualfund_holders['Date Reported'])
self._mutualfund_holders['Date Reported'])
if '% Out' in self._mutualfund_holders:
self._mutualfund_holders['% Out'] = self._mutualfund_holders[
'% Out'].str.replace('%', '').astype(float)/100
'% Out'].str.replace('%', '').astype(float)/100

# sustainability
d = {}
Expand Down

0 comments on commit 56d6267

Please sign in to comment.