Skip to content

SemanticLayerSchema limit seems to do nothing #1874

@oreiiikin

Description

@oreiiikin

System Info

python = ">=3.11,<3.12"
pandas = "^2.3.3"
pandasai = "^3.0.0"

🐛 Describe the bug

Hi everyone!
I'm trying to limit df rows count to put in prompt with SemanticLayerSchema:

import pandasai as pai
from pandasai.data_loader.semantic_layer_schema import SemanticLayerSchema, Source

df = pai.read_csv(filepath="path.csv")

schema = SemanticLayerSchema(
    name="name",
    description="description",
    source=Source(type="csv", path="path.csv"),
    limit=3,
)
df.schema = schema

But it seems to do absolutely nothing when I check the logs, how do I fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions