OpenBB-finance/OpenBB · error · ValueError
No data was found in the DataFrame.
Error message
No data was found in the DataFrame.
What it means
The price-performance bar chart converts the OBBject results to a DataFrame indexed by symbol and checks row count; zero rows means the provider returned no performance data at all, and the ValueError 'No data was found in the DataFrame.' is raised before any column matching occurs.
Solutions
- Check res.results is non-empty before charting
- Verify the symbols are valid and the provider has coverage (try obb.equity.price.price_performance(symbol='AAPL') alone)
- Retry after confirming provider status/credentials in the user account
Example fix
# before res = obb.equity.price.price_performance(symbol='BADTICKER') res.charting() # after res = obb.equity.price.price_performance(symbol='AAPL') assert res.results, 'no performance data returned' res.charting()
Defensive patterns
Strategy: validation
Validate before calling
res = obb.equity.price.price_performance(symbol=symbols) assert res.results, 'provider returned no performance rows'
Type guard
def has_rows(res) -> bool:
return bool(res.results) and len(res.to_df()) > 0 Try / catch
try:
res.charting()
except ValueError as e:
if 'No data was found' in str(e):
logging.warning('empty price-performance payload for %s', symbols) Prevention
- Check res.results before charting
- Test single liquid symbols first
- Monitor provider status/credentials for silent empty payloads
When it happens
Trigger: Calling chart/equity/price/price_performance (or .charting() on a price-performance result) when the provider returned zero symbols; empty symbol list passed to the endpoint; provider outage returning an empty payload.
Common situations: Batch requests where all tickers were invalid/delisted; market-data API quota exhausted returning empty bodies; upstream provider errors swallowed into empty results.
Related errors
- Error: No data to plot.
- Error: No data to plot.
- No columns matching, , were found in the data.
- Column ' ', or 'close', not found in the data.
- Could not find the route
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/a3a9440421b1f7cf.
Report an issue: GitHub.
Appendix: source
Thrown at openbb_platform/obbject_extensions/charting/openbb_charting/charts/price_performance.py:51
"three_month",
"six_month",
"ytd",
"one_year",
"two_year",
"three_year",
"four_year",
"five_year",
]
df = DataFrame()
chart_df = DataFrame()
if "symbol" in data.columns:
data = data.set_index("symbol")
chart_cols = []
if len(data) == 0:
raise ValueError("No data was found in the DataFrame.")
data = data.drop_duplicates(keep="first")
for col in cols:
if col in data.columns and data[col].notnull().any():
df[col.replace("_", " ").title() if col != "ytd" else col.upper()] = data[
col
].apply(lambda x: round(x * 100, 4) if x is not None else None)
if df.empty:
raise ValueError(f"No columns matching, {cols}, were found in the data.")
chart_df = df.T
chart_cols = chart_df.columns.to_list()
if "limit" in kwargs and isinstance(kwargs.get("limit"), int):
limit = kwargs.pop("limit", 10)
chart_df = chart_df.head(limit) # type: ignoreView on GitHub (pinned to 3e071fcc2c)