eshan6704 commited on
Commit
85522e2
·
verified ·
1 Parent(s): cf177c3

Update daily.py

Browse files
Files changed (1) hide show
  1. daily.py +2 -2
daily.py CHANGED
@@ -13,8 +13,8 @@ def fetch_daily(symbol, max_rows=200):
13
  # --- Fetch historical data ---
14
  df = yf.download(symbol + ".NS", period="1y", interval="1d").round(2)
15
 
16
- if isinstance(combined_df.columns, pd.MultiIndex):
17
- combined_df.columns = combined_df.columns.get_level_values(0)
18
 
19
  if df.empty:
20
  return html_card("Error", f"No daily data found for {symbol}")
 
13
  # --- Fetch historical data ---
14
  df = yf.download(symbol + ".NS", period="1y", interval="1d").round(2)
15
 
16
+ if isinstance(df.columns, pd.MultiIndex):
17
+ df.columns = df.columns.get_level_values(0)
18
 
19
  if df.empty:
20
  return html_card("Error", f"No daily data found for {symbol}")