Skip to content

BUG: to_dict should return a native datetime object for NumPy backed dataframes #37571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Nov 4, 2020
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
af2f84d
BUG/REF: add native arg to maybe_box_datetimelike
arw2019 Nov 1, 2020
87265bc
BUG: pass native=True arg to maybe_box_datetimelike
arw2019 Nov 1, 2020
6b8221c
TST: add datetime column to test
arw2019 Nov 1, 2020
a28bfad
TST/CLN: test comments
arw2019 Nov 1, 2020
8821a8d
DOC: whatsnew
arw2019 Nov 1, 2020
717a6e3
CLN/TST: add bool test case & DRY the test
arw2019 Nov 1, 2020
ad78190
REF (feedback): move maybe_box_datetimelike common.py -> dtypes/cast.py
arw2019 Nov 3, 2020
c93fca9
feedback: remove native arg/accept Timestamp return type
arw2019 Nov 2, 2020
47fd80d
Merge remote-tracking branch 'upstream/master' into GH21256
arw2019 Nov 3, 2020
de86652
BUG: fix import in pd.core.indexes.interval.py
arw2019 Nov 3, 2020
b17a0db
BUG: fix import in pd.core.dtypes.cast.py
arw2019 Nov 3, 2020
1057c8a
BUG: revert accidental change tslib->tslibs
arw2019 Nov 3, 2020
5b2a84a
Merge remote-tracking branch 'upstream/master' into GH21256
arw2019 Nov 3, 2020
10119a7
REF (feedback): move dict_compat to core/dtypes/cast.py
arw2019 Nov 4, 2020
44d82c4
REF/TST: move dict_compat tests to dtypes/cast/test_dict_compat.py
arw2019 Nov 4, 2020
d737457
Merge remote-tracking branch 'upstream/master' into GH21256
arw2019 Nov 4, 2020
5d8d374
DOC: improve dict_compat doctring
arw2019 Nov 4, 2020
b9b8e31
DOC: add maybe_box_datetimelike docstring
arw2019 Nov 4, 2020
f1667f6
CLN: consolidate return in maybe_box_datetimelike
arw2019 Nov 4, 2020
5b984b8
TYP: maybe_box_datetimelike
arw2019 Nov 4, 2020
017fa58
TYP: maybe_box_datetimelike (return type)
arw2019 Nov 4, 2020
c76c09c
TYP: dict_compat
arw2019 Nov 4, 2020
2697b85
TST: remove dict_compat test from test_common.py
arw2019 Nov 4, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
BUG: revert accidental change tslib->tslibs
  • Loading branch information
arw2019 committed Nov 3, 2020
commit 1057c8a09beb26eb970ad76e90356a3035a7a3ac
4 changes: 2 additions & 2 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import numpy as np

from pandas._libs import lib, tslibs
from pandas._libs import lib, tslib, tslibs
from pandas._libs.tslibs import (
NaT,
OutOfBoundsDatetime,
Expand Down Expand Up @@ -1352,7 +1352,7 @@ def try_datetime(v):
# safe coerce to datetime64
try:
# GH19671
v = tslibs.array_to_datetime(v, require_iso8601=True, errors="raise")[0]
v = tslib.array_to_datetime(v, require_iso8601=True, errors="raise")[0]
except ValueError:

# we might have a sequence of the same-datetimes with tz's
Expand Down