-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: DataFrame(dt64data, dtype=td64) corner cases #38792
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
Changes from 2 commits
2c9ced5
205b0ed
d805b88
c5f40a3
84eaea7
6d2a017
d310192
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -379,3 +379,12 @@ def test_to_records_datetimeindex_with_tz(self, tz): | |
|
||
# both converted to UTC, so they are equal | ||
tm.assert_numpy_array_equal(result, expected) | ||
|
||
def test_to_records_timeseries(self): | ||
index = date_range("1/1/2000", periods=10) | ||
df = DataFrame(np.random.randn(10, 3), index=index, columns=["a", "b", "c"]) | ||
|
||
result = df.to_records() | ||
result["index"].dtype == "M8[ns]" | ||
|
||
result = df.to_records(index=False) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you assert the expected (or something about it) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is just moving the existing test to the correct location. i can revert the move as out of scope There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. its fine to move, but if you can an expected value would be good There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reverted this move |
Uh oh!
There was an error while loading. Please reload this page.