Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions pandasai/smart_dataframe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@


class SmartDataframe:
"""
A wrapper class for pandas DataFrame that integrates with PandasAI features.
Provides additional metadata and configuration options, and will be deprecated in favor of df.chat().
"""

_table_name: str
_table_description: str
_custom_head: str = None
Expand All @@ -27,6 +32,16 @@ def __init__(
custom_head: pd.DataFrame = None,
config: Config = None,
):
"""
Initialize a SmartDataframe instance.

Args:
df (pd.DataFrame): The pandas DataFrame to wrap.
name (str, optional): Name of the table.
description (str, optional): Description of the table.
custom_head (pd.DataFrame, optional): Custom head DataFrame for display.
config (Config, optional): PandasAI configuration object.
"""
warnings.warn(
"\n"
+ "*" * 80
Expand Down