run-llama/llama_index · error · ImportError

You must install the `pandas` package to use this node parse

Error message

You must install the `pandas` package to use this node parser.

What it means

Error "You must install the `pandas` package to use this node parser." thrown in run-llama/llama_index.

Source

Thrown at llama-index-core/llama_index/core/node_parser/relational/utils.py:11

from typing import Any

from io import StringIO


def md_to_df(md_str: str) -> Any:
    """Convert Markdown to dataframe."""
    try:
        import pandas as pd
    except ImportError:
        raise ImportError(
            "You must install the `pandas` package to use this node parser."
        )

    # Replace " by "" in md_str
    md_str = md_str.replace('"', '""')

    # Replace markdown pipe tables with commas
    md_str = md_str.replace("|", '","')

    # Remove the second line (table header separator)
    lines = md_str.split("\n")
    md_str = "\n".join(lines[:1] + lines[2:])

    # Remove the first and last second char of the line (the pipes, transformed to ",")
    lines = md_str.split("\n")
    md_str = "\n".join([line[2:-2] for line in lines])

    # Check if the table is empty

View on GitHub (pinned to afd0fef371)

Solutions

  1. Install pandas: `pip install pandas`.

When it happens

Trigger: Thrown at llama-index-core/llama_index/core/node_parser/relational/utils.py:11 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15). Data as JSON: /api/errors/e33caaba125f5694. Report an issue: GitHub.