fix: Correct indentation error in get_stock_data function
This commit is contained in:
parent
8573399f9d
commit
b67586116c
@ -87,15 +87,15 @@ def get_stock_data(ticker: str, start_date: datetime, end_date: datetime, interv
|
|||||||
print("\nExecuting Query:")
|
print("\nExecuting Query:")
|
||||||
print(query) # Debugging: Print the query to verify its correctness
|
print(query) # Debugging: Print the query to verify its correctness
|
||||||
|
|
||||||
result = client.query(query)
|
result = client.query(query)
|
||||||
if not result.result_rows:
|
if not result.result_rows:
|
||||||
print(f"No data found for {ticker}")
|
print(f"No data found for {ticker}")
|
||||||
return pd.DataFrame()
|
return pd.DataFrame()
|
||||||
|
|
||||||
df = pd.DataFrame(
|
df = pd.DataFrame(
|
||||||
result.result_rows,
|
result.result_rows,
|
||||||
columns=['date', 'open', 'high', 'low', 'close', 'volume']
|
columns=['date', 'open', 'high', 'low', 'close', 'volume']
|
||||||
)
|
)
|
||||||
|
|
||||||
if interval != "daily" and interval != "5min":
|
if interval != "daily" and interval != "5min":
|
||||||
# Resample to desired interval
|
# Resample to desired interval
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user