employees and eps functions

This commit is contained in:
Pietro Rodolfo Masera 2023-05-24 10:02:09 +02:00
parent 2a874ee9ca
commit 373090144c
2 changed files with 635 additions and 0 deletions

20
indexer/EPS.py Normal file
View file

@ -0,0 +1,20 @@
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def compare_tickers(tickers: list):
combined_df = pd.DataFrame()
for ticker in tickers:
filepath = f'Companies_Data/{ticker}_Data/{ticker}earnings.csv'
eps_quarterly = pd.read_csv(filepath)
ticker_df = eps_quarterly.loc[eps_quarterly['symbol'] == ticker]
ticker_df['ticker'] = ticker
combined_df = combined_df._append(ticker_df)
sns.catplot(data=combined_df, x='quarter', y='epsActual', hue='ticker', kind='bar', aspect=2)
plt.xticks(rotation=30)
plt.title('Earnings per Share (EPS)')
plt.show()
tickers_list = ['INTC', 'AAPL', 'GOOGL']
compare_tickers(tickers_list)

615
indexer/Employees.ipynb Normal file

File diff suppressed because one or more lines are too long