Files
OpenBB/openbb_terminal/stocks/stocks_view.py
Colin Delahunty 963ca9b2b9 Audit SDK and View/Model functions (#3384)
* 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>
2022-11-17 16:25:36 +01:00

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