os1187 commited on
Commit
be7e777
1 Parent(s): 219f5c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -2,8 +2,11 @@ import streamlit as st
2
  import yfinance as yf
3
  import pandas as pd
4
 
5
- # Load S&P 500 averages from a CSV file
 
 
6
  def load_sp500_averages(filepath):
 
7
  return pd.read_csv(filepath, header=0, names=['Ratio', 'Average']).set_index('Ratio')
8
 
9
  # Fetch financial data for a single stock
@@ -26,8 +29,7 @@ def fetch_stock_data(ticker_symbol):
26
  }
27
 
28
  return financials, info
29
- # Define the path to your CSV file
30
- sp500_averages_path = 'sp500_averages.csv'
31
 
32
  # Update the cache decorator
33
  @st.experimental_memo
 
2
  import yfinance as yf
3
  import pandas as pd
4
 
5
+ # Define the path to your CSV file
6
+ sp500_averages_path = 'sp500_averages.csv'
7
+
8
  def load_sp500_averages(filepath):
9
+ # Load the CSV without specifying an index column name
10
  return pd.read_csv(filepath, header=0, names=['Ratio', 'Average']).set_index('Ratio')
11
 
12
  # Fetch financial data for a single stock
 
29
  }
30
 
31
  return financials, info
32
+
 
33
 
34
  # Update the cache decorator
35
  @st.experimental_memo