Skip to content

Conversation

usersblock
Copy link
Contributor

Test added to test_to_datetime.py to test the conversion to datetime for a series with a float index.

@jreback jreback changed the title TST: Added test for datetime conversion issue #28238 pd.to_datetime() fails for KeyError when raising monotonic increasing index ValueError Jul 22, 2021
@jreback jreback added Testing pandas testing functions or related to the test suite Datetime Datetime data dtype labels Jul 22, 2021
@jreback jreback added this to the 1.4 milestone Jul 22, 2021
@pytest.mark.parametrize("cache", [True, False])
def test_to_datetime_monotonic_increasing_index(cache):
# GH28238
times = date_range(Timestamp("1980"), periods=50, freq="YS")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please use the variable start_caching_at to ensure this stays consistent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should work now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one 50 left

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@jreback jreback merged commit c2fe667 into pandas-dev:master Jul 25, 2021
@jreback
Copy link
Contributor

jreback commented Jul 25, 2021

thanks @usersblock

CGe0516 pushed a commit to CGe0516/pandas that referenced this pull request Jul 29, 2021
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Datetime Datetime data dtype Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pd.to_datetime() fails for KeyError when raising monotonic increasing index ValueError

4 participants