eshan6704 commited on
Commit
53f428f
·
verified ·
1 Parent(s): f618895

Update daily.py

Browse files
Files changed (1) hide show
  1. daily.py +3 -3
daily.py CHANGED
@@ -13,9 +13,9 @@ 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(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}")
21
  df.reset_index(inplace=True)
 
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
+ df.columns=["Date", "Close", "High", "Low", "Open", "Volume"]
19
  if df.empty:
20
  return html_card("Error", f"No daily data found for {symbol}")
21
  df.reset_index(inplace=True)