Skip to content

Commit

Permalink
update pandasai/smart_dataframe/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mspronesti committed Feb 6, 2024
1 parent eae3ca9 commit 8d6d069
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pandasai/smart_dataframe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,7 @@ def _truncate_head_columns(self, df: DataFrameType, max_size=25) -> DataFrameTyp
Returns:
DataFrameType: Pandas, Modin or Polars dataframe
"""
engine = df_type(df)
if engine in ("pandas", "modin"):
if (engine := df_type(df)) in ("pandas", "modin"):
df_trunc = df.copy()

for col in df.columns:
Expand Down

0 comments on commit 8d6d069

Please sign in to comment.