Last active
January 25, 2024 13:50
-
-
Save romanmichaelpaolucci/f2ac10d6ae4180a09e2fccf7abcce72f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 get_latest_highest(stock, comp, year): | |
return get_exec_comp(stock)[get_exec_comp(stock)['year'] == year].drop_duplicates("nameAndPosition").sort_values(by=comp, ascending=False).iloc[0] | |
fr = [] | |
p = [] | |
stock_comp = [] | |
total_comp = [] | |
for ticker in r_2021['Adj Close'].reset_index()['index'].values: | |
fr.append(r_2021['Adj Close'][ticker]) | |
p.append(p_2021['Adj Close'][ticker]) | |
stock_comp.append(get_latest_highest(ticker, 'stock_award', 2021)['stock_award']) | |
total_comp.append(get_latest_highest(ticker, 'total', 2021)['total']) | |
print('Done!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment