mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-02 23:41:27 +00:00
* Initial commit * Finalized functionality * update script * Allow using it without forecasting * Update gitignore * Update `sdk_audit.py` * Fixed issues, found more * Added fix for helper functions, and column for SDK type * Checked one more thing * Moved file * Move files ending with models/views * Added fix of name * Added file path fixes * Patch to fix sdk_audit for windows * fix Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
15 lines
473 B
Python
15 lines
473 B
Python
import pandas as pd
|
|
from openbb_terminal.stocks import stocks_model
|
|
from openbb_terminal.helper_funcs import print_rich_table
|
|
|
|
|
|
def display_quote(symbol: str) -> pd.DataFrame:
|
|
"""Display quote from YahooFinance"""
|
|
quote_data = stocks_model.load_quote(symbol)
|
|
if quote_data is None:
|
|
return pd.DataFrame()
|
|
if quote_data.empty:
|
|
return pd.DataFrame()
|
|
print_rich_table(quote_data, title="Ticker Quote", show_index=True)
|
|
return quote_data
|