diff --git a/pandasai/smart_dataframe/__init__.py b/pandasai/smart_dataframe/__init__.py index 647846818..3672e7d01 100644 --- a/pandasai/smart_dataframe/__init__.py +++ b/pandasai/smart_dataframe/__init__.py @@ -433,7 +433,10 @@ def _get_sample_head(self) -> DataFrameType: sampler = DataSampler(head) sampled_head = sampler.sample(rows_to_display) - return self._truncate_head_columns(sampled_head) + if self.lake.config.enforce_privacy: + return sampled_head + else: + return self._truncate_head_columns(sampled_head) def _load_from_config(self, name: str): """