From d9806363267fbc2a10fefb2108f12f3a3fa4fb80 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Wed, 25 Sep 2024 12:40:38 +0200 Subject: [PATCH 1/2] API docs: elaborate on Result.to_df options Explain what passing `parse_dates=False` to `Result.to_df` does. --- src/neo4j/_async/work/result.py | 2 ++ src/neo4j/_sync/work/result.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/neo4j/_async/work/result.py b/src/neo4j/_async/work/result.py index 9dfb11ae..4ff64afe 100644 --- a/src/neo4j/_async/work/result.py +++ b/src/neo4j/_async/work/result.py @@ -885,6 +885,8 @@ async def to_df( If :data:`True`, columns that exclusively contain :class:`time.DateTime` objects, :class:`time.Date` objects, or :data:`None`, will be converted to :class:`pandas.Timestamp`. + If :data:`False`, columns of the above types will be left as is + (dtype ``object``). :raises ImportError: if `pandas` library is not available. :raises ResultConsumedError: if the transaction from which this result diff --git a/src/neo4j/_sync/work/result.py b/src/neo4j/_sync/work/result.py index 33380694..d52d14a6 100644 --- a/src/neo4j/_sync/work/result.py +++ b/src/neo4j/_sync/work/result.py @@ -885,6 +885,8 @@ def to_df( If :data:`True`, columns that exclusively contain :class:`time.DateTime` objects, :class:`time.Date` objects, or :data:`None`, will be converted to :class:`pandas.Timestamp`. + If :data:`False`, columns of the above types will be left as is + (dtype ``object``). :raises ImportError: if `pandas` library is not available. :raises ResultConsumedError: if the transaction from which this result From 23b70798387d379e48a0b55ed9fa3c54789cd73b Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Wed, 25 Sep 2024 13:47:39 +0200 Subject: [PATCH 2/2] Improve wording Signed-off-by: Rouven Bauer --- src/neo4j/_async/work/result.py | 4 ++-- src/neo4j/_sync/work/result.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/neo4j/_async/work/result.py b/src/neo4j/_async/work/result.py index 4ff64afe..8bce864b 100644 --- a/src/neo4j/_async/work/result.py +++ b/src/neo4j/_async/work/result.py @@ -885,8 +885,8 @@ async def to_df( If :data:`True`, columns that exclusively contain :class:`time.DateTime` objects, :class:`time.Date` objects, or :data:`None`, will be converted to :class:`pandas.Timestamp`. - If :data:`False`, columns of the above types will be left as is - (dtype ``object``). + If :data:`False`, columns of the above types will be left as driver + types (dtype ``object``). :raises ImportError: if `pandas` library is not available. :raises ResultConsumedError: if the transaction from which this result diff --git a/src/neo4j/_sync/work/result.py b/src/neo4j/_sync/work/result.py index d52d14a6..f7da66c5 100644 --- a/src/neo4j/_sync/work/result.py +++ b/src/neo4j/_sync/work/result.py @@ -885,8 +885,8 @@ def to_df( If :data:`True`, columns that exclusively contain :class:`time.DateTime` objects, :class:`time.Date` objects, or :data:`None`, will be converted to :class:`pandas.Timestamp`. - If :data:`False`, columns of the above types will be left as is - (dtype ``object``). + If :data:`False`, columns of the above types will be left as driver + types (dtype ``object``). :raises ImportError: if `pandas` library is not available. :raises ResultConsumedError: if the transaction from which this result