INNER CODE UNIT · Python

_dataframe_first_page

pgalko/BambooAI · web_app/app.py:551

def _dataframe_first_page(df, execution_mode, df_id, executor_client):
    """The Data tab's first page (2026-09-07), from the executor in api mode or the frame locally; None if unavailable."""
    try:
        if execution_mode == 'api' and executor_client is not None and df_id:
            page = executor_client.dataframe_page(df_id, 0, 50)
        elif df is not None:
            page = utils.page_frame(df, 0, 50)
        else:
            page = None
        if page:
            page['df_id'] = df_id
            return page
        if execution_mode == 'api':
            logger.warning("Data tab: the executor returned no page for %s (an image before 2026-09-07 has no /dataframe_page) - showing the 100-row preview", df_id)
    except Exception as exc:                                # noqa: BLE001
        logger.warning("Data tab: page request failed (%s) - showing the 100-row preview", exc)
    return None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…