Skip to content

Conversation

Narendersingh007
Copy link

This PR fixes an issue where the explode method in both Series and DataFrame does not preserve the datetime unit information (such as milliseconds or microseconds) of DatetimeIndex or datetime-like data. Previously, exploding a datetime-like Series or DataFrame column would convert timestamps to nanosecond resolution, losing the original unit precision.

The fix ensures that after exploding, the resulting Series or DataFrame retains the original datetime unit dtype, maintaining consistency and avoiding unwanted dtype changes.

Additionally, relevant tests have been updated and extended to verify that the datetime unit is preserved through explode operations in both single- and multi-column cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: explode() converts timestamps at millisecond resolution in DatetimeIndex to nanosecond resolution

2 participants