run-llama/llama_index · error · ImportError
pandas is required for this function. Please install it with
Error message
pandas is required for this function. Please install it with `pip install pandas`.
What it means
Error "pandas is required for this function. Please install it with `pip install pandas`." thrown in run-llama/llama_index.
Source
Thrown at llama-index-core/llama_index/core/node_parser/relational/base_element.py:372
def _get_nodes_from_buffer(
self, buffer: List[str], node_parser: NodeParser
) -> List[BaseNode]:
"""Get nodes from buffer."""
doc = Document(text="\n\n".join(list(buffer)))
return node_parser.get_nodes_from_documents([doc])
def get_nodes_from_elements(
self,
elements: List[Element],
node_inherited: Optional[TextNode] = None,
ref_doc_text: Optional[str] = None,
) -> List[BaseNode]:
"""Get nodes and mappings."""
try:
import pandas as pd
except ImportError:
raise ImportError(
"pandas is required for this function. Please install it with `pip install pandas`."
)
from llama_index.core.node_parser import SentenceSplitter
node_parser = self.nested_node_parser or SentenceSplitter()
nodes: List[BaseNode] = []
cur_text_el_buffer: List[str] = []
for element in elements:
if element.type == "table" or element.type == "table_text":
# flush text buffer for table
if len(cur_text_el_buffer) > 0:
cur_text_nodes = self._get_nodes_from_buffer(
cur_text_el_buffer, node_parser
)
nodes.extend(cur_text_nodes)
cur_text_el_buffer = []View on GitHub (pinned to afd0fef371)
Solutions
- Install pandas: `pip install pandas`.
When it happens
Trigger: Thrown at llama-index-core/llama_index/core/node_parser/relational/base_element.py:372 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/2e1c0a20d3486205.
Report an issue: GitHub.