Skip to content

Commit 348066f

Browse files
committed
Filter out pandas warnings
the load datasets functions use `read_parquet`
1 parent 9702752 commit 348066f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

graphdatascience/graph/graph_proc_runner.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import pathlib
33
import sys
4+
import warnings
45
from typing import Any, Dict, List, Optional, Union
56

67
import pandas as pd
@@ -42,6 +43,15 @@
4243

4344

4445
class BaseGraphProcRunner(UncallableNamespace, IllegalAttrChecker):
46+
def __init__(self, query_runner: Any, namespace: str, server_version: ServerVersion):
47+
super().__init__(query_runner, namespace, server_version)
48+
# Pandas 2.2.0 deprecated an API used by ArrowTable.to_pandas() (< pyarrow 14.0)
49+
warnings.filterwarnings(
50+
"ignore",
51+
category=DeprecationWarning,
52+
message=r"Passing a BlockManager to DataFrame is deprecated",
53+
)
54+
4555
@staticmethod
4656
def _path(package: str, resource: str) -> pathlib.Path:
4757
if sys.version_info >= (3, 9):

0 commit comments

Comments
 (0)