eshan6704 commited on
Commit
b211169
·
verified ·
1 Parent(s): ff76bab

Update app/daily.py

Browse files
Files changed (1) hide show
  1. app/daily.py +4 -0
app/daily.py CHANGED
@@ -68,6 +68,10 @@ def fetch_daily(symbol, date_end, date_start, b2_save=False):
68
  if df.empty:
69
  return wrap_html(f"<h1>No daily data for {symbol}</h1>")
70
 
 
 
 
 
71
  df.reset_index(inplace=True)
72
  df["Date"] = df["Date"].dt.strftime("%d-%b-%Y")
73
 
 
68
  if df.empty:
69
  return wrap_html(f"<h1>No daily data for {symbol}</h1>")
70
 
71
+ # Flatten MultiIndex columns if present
72
+ if isinstance(df.columns, pd.MultiIndex):
73
+ df.columns = df.columns.get_level_values(0)
74
+
75
  df.reset_index(inplace=True)
76
  df["Date"] = df["Date"].dt.strftime("%d-%b-%Y")
77