eshan6704 commited on
Commit
7fa05a4
·
verified ·
1 Parent(s): 8edc019

Update daily.py

Browse files
Files changed (1) hide show
  1. daily.py +5 -1
daily.py CHANGED
@@ -11,7 +11,11 @@ def fetch_daily_full_table(symbol, max_rows=200):
11
  """
12
  try:
13
  # --- Fetch historical data ---
14
- df = yf.download(symbol + ".NS", period="6mo", interval="1d")
 
 
 
 
15
  if df.empty:
16
  return html_card("Error", f"No daily data found for {symbol}")
17
  df.reset_index(inplace=True)
 
11
  """
12
  try:
13
  # --- Fetch historical data ---
14
+ df = yf.download(symbol + ".NS", period="6mo", 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}")
21
  df.reset_index(inplace=True)