Skip to content

API Reference parrot.tools.dataset_manager.sources.memory

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.tools.dataset_manager.sources.memory

View source

InMemorySource — wraps an already-loaded pd.DataFrame as a DataSource.

No I/O is performed; schema is derived directly from df.dtypes and fetch returns the wrapped DataFrame unchanged.

Alias DataSource

Re-exported from parrot.tools.dataset_manager.sources.base.DataSource.

Class InMemorySource

Wraps an already-loaded pd.DataFrame as a DataSource.

Parameter Type Default Description
df pd.DataFrame The DataFrame to wrap.
name str Logical name used as the cache key suffix.

Attributes:

Attribute Type Description
cache_key str Stable cache key for Redis keying.

Method InMemorySource.prefetch_schema

Return column-to-type mapping derived from df.dtypes (no I/O).

prefetch_schema() -> Dict[str, str]

Returns: Dict[str, str] — Dictionary mapping column names to their dtype strings.

Method InMemorySource.fetch

Return the wrapped DataFrame unchanged.

fetch(**params) -> pd.DataFrame

Parameter Type Default Description
**params {} Ignored — in-memory sources have no query parameters.

Returns: pd.DataFrame — The original DataFrame passed at construction time.

Method InMemorySource.describe

Return a human-readable description for the LLM.

describe() -> str

Returns: str — String describing the DataFrame shape.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally