Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit a68d818

Browse files
committed
fix: suppress JSONDtypeWarning in _get_display_df_and_blob_cols
1 parent afa099b commit a68d818

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

bigframes/dataframe.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -813,11 +813,13 @@ def _get_display_df_and_blob_cols(self) -> tuple[DataFrame, list[str]]:
813813
df = self
814814
blob_cols = []
815815
if bigframes.options.display.blob_display:
816-
blob_cols = [
817-
series_name
818-
for series_name, series in self.items()
819-
if series.dtype == bigframes.dtypes.OBJ_REF_DTYPE
820-
]
816+
with warnings.catch_warnings():
817+
warnings.simplefilter("ignore", bigframes.exceptions.JSONDtypeWarning)
818+
blob_cols = [
819+
series_name
820+
for series_name, series in self.items()
821+
if series.dtype == bigframes.dtypes.OBJ_REF_DTYPE
822+
]
821823
if blob_cols:
822824
df = self.copy()
823825
for col in blob_cols:

0 commit comments

Comments
 (0)