os1187 commited on
Commit
5bd687d
1 Parent(s): fabb632

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -18,8 +18,9 @@ stocks = ['AAPL', 'MSFT', 'AMZN', 'GOOGL', 'FB', 'BRK.B', 'JNJ', 'V', 'PG', 'JPM
18
  sp500_averages_path = 'sp500_averages.csv'
19
 
20
  def load_sp500_averages(filepath):
21
- # Load S&P 500 averages from a CSV file
22
- return pd.read_csv(filepath, index_col='Ratio')
 
23
 
24
  def fetch_stock_data(ticker_symbol):
25
  # Fetch financial data for a single stock
 
18
  sp500_averages_path = 'sp500_averages.csv'
19
 
20
  def load_sp500_averages(filepath):
21
+ # Load the CSV without specifying an index column name
22
+ return pd.read_csv(filepath, header=0, names=['Ratio', 'Average']).set_index('Ratio')
23
+
24
 
25
  def fetch_stock_data(ticker_symbol):
26
  # Fetch financial data for a single stock