Skip to content

Commit 1a14360

Browse files
committed
Filter pandas 2.2.0 warning
1 parent db46db2 commit 1a14360

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

graphdatascience/query_runner/arrow_query_runner.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,13 @@ def _run_arrow_property_get(self, graph_name: str, procedure_name: str, configur
282282
new_colum_names = ["nodeLabels" if i == "labels" else i for i in arrow_table.column_names]
283283
arrow_table = arrow_table.rename_columns(new_colum_names)
284284

285+
# Pandas 2.2.0 deprecated an API used by ArrowTable.to_pandas() (< pyarrow 15.0)
286+
warnings.filterwarnings(
287+
"ignore",
288+
category=DeprecationWarning,
289+
message=r"Passing a BlockManager to TopologyDataFrame is deprecated",
290+
)
291+
285292
return self._sanitize_arrow_table(arrow_table).to_pandas() # type: ignore
286293

287294
def create_graph_constructor(

0 commit comments

Comments
 (0)