Skip to content

Conversation

jbrockmendel
Copy link
Member

Ultimately we want these _validate_foo methods to be whittled down to only one or two methods.

from pandas.tseries import frequencies
from pandas.tseries.offsets import DateOffset, Tick

DTScalar = Union[Period, Timestamp, Timedelta, NaTType]
Copy link
Contributor

Choose a reason for hiding this comment

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

would put in _typing and call it DatetimeScalar

Copy link
Member Author

Choose a reason for hiding this comment

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

ok

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually looks like we already have DatetimeLikeScalar which just needs to have NaTType added to it

Copy link
Member Author

Choose a reason for hiding this comment

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

updated+green

@jreback jreback added the Refactor Internal refactoring of code label May 1, 2020
@jreback jreback added this to the 1.1 milestone May 1, 2020
@jreback jreback merged commit be58cd9 into pandas-dev:master May 1, 2020
@jbrockmendel jbrockmendel deleted the dtlike-validators-unbox branch May 1, 2020 20:16
rhshadrach pushed a commit to rhshadrach/pandas that referenced this pull request May 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Internal refactoring of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants