-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
if we have a string Series, e.g. s = Series(['2013-01-02', '2013-1-03'])
we normally just run this thru pd.to_datetime(s)
it might be convenient to do these operations (.to_numeric,.to_datetime,.to_timedelta
)
directly as methods.
s.str.to_numeric(....)
, IOW in the.str
namespaces.to_numeric(...)
, in main Series namespaces.astype(.., dtype=...)
but actually pass thru to using the.to_numeric/.to_datetime
functions directly, so you could have something like
s.astype('datetime', format='%Y-%m-%d')
and it would do the right thing. This overloads things a bit though
right now we have a bit of confusion because we support .astype
which is pretty much a pass thru to numpy, and the more dtype-aware (and functional) .to_*
ones.
Furthermore I think we could update the .astype
docs (and the .to_*
) ones to cross reference.
Metadata
Metadata
Assignees
Labels
Closing CandidateMay be closeable, needs more eyeballsMay be closeable, needs more eyeballsEnhancementNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action