Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ def daily_stock_data(symbol: str)-> str: #it's import to specify the return type
|
|
| 22 |
ticker = yf.Ticker(symbol)
|
| 23 |
df = ticker.history(start=start_date, end=end_date, auto_adjust=True)
|
| 24 |
return f"""
|
| 25 |
-
Today's Stock data for {symbol}:Open : {df['Open'].iloc[0]} High : {df['High'].iloc[0]} Low : {df['Low'].iloc[0]} Close : {df['
|
| 26 |
"""
|
| 27 |
except Exception as e:
|
| 28 |
return f"Error fetching stock data for {symbol}: {str(e)}"
|
|
|
|
| 22 |
ticker = yf.Ticker(symbol)
|
| 23 |
df = ticker.history(start=start_date, end=end_date, auto_adjust=True)
|
| 24 |
return f"""
|
| 25 |
+
Today's Stock data for {symbol}:Open : {df['Open'].iloc[0]} High : {df['High'].iloc[0]} Low : {df['Low'].iloc[0]} Close : {df['Close'].iloc[0]} Volume : {df['Volume'].iloc[0]}
|
| 26 |
"""
|
| 27 |
except Exception as e:
|
| 28 |
return f"Error fetching stock data for {symbol}: {str(e)}"
|