Created
July 23, 2019 08:40
-
-
Save zaoldyeck/eedc8fb0977e00fd622e4e21b010b269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def 獲利年數(data): | |
eps = data.get('稀釋每股盈餘合計', 4*10).fillna(0) | |
count = 0 | |
for start, end in zip(range(0, 37, 4), range(4, 41, 4)): | |
if not (eps.iloc[start:end].empty): | |
count += eps.iloc[start:end].sum() > 0 | |
return count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment