Skip to content

Commit d48997a

Browse files
committed
Merge branch 'add/skills' of https://github.com/gventuri/pandas-ai into add/skills
2 parents fed860e + 26f8816 commit d48997a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

‎pandasai/config.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,4 @@ def __str__(cls) -> str:
143143
Returns:
144144
str: String representation of all skills
145145
"""
146-
return "".join(str(skill) for skill in cls._skills)
146+
return "\n".join(str(skill) for skill in cls._skills)

‎pandasai/core/code_generation/code_cleaning.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _check_direct_sql_func_def_exists(self, node: ast.AST) -> bool:
3232

3333
def _check_if_skill_func_def_exists(self, node: ast.AST) -> bool:
3434
"""
35-
Check if the node defines a direct SQL execution function.
35+
Check if the node defines a skill function.
3636
"""
3737
for skill in self.context.skills:
3838
if isinstance(node, ast.FunctionDef) and node.name == skill.name:

‎pandasai/skills/__init__.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __init__(
2727
description: The description of the skill.
2828
Defaults to the function docstring.
2929
name: The name of the function. Mandatory when `func` is a lambda.
30-
Defaults to the functions name.
30+
Defaults to the function's name.
3131
**kwargs: additional params
3232
"""
3333

@@ -84,7 +84,7 @@ def skill(*args: Union[str, Callable]) -> Callable:
8484
.. code-block:: python
8585
8686
@skill
87-
def compute_flight_prices(offers: pd.Dataframe) -> List[float]:
87+
def compute_flight_prices(offers: pd.DataFrame) -> List[float]:
8888
\"\"\"Computes the flight prices\"\"\"
8989
return
9090

0 commit comments

Comments
 (0)