Skip to content

to_timedelta does not recognize 'h' and 'm' units #7611

Closed
@vfilimonov

Description

@vfilimonov

'h' and 'm' units are not correctly recognized in to_timedelta:

print pd.to_timedelta(1,unit='D')
print pd.to_timedelta(1,unit='h')
print pd.to_timedelta(1,unit='m')
print pd.to_timedelta(1,unit='s')
print pd.to_timedelta(1,unit='ms')
print pd.to_timedelta(1,unit='us')
print pd.to_timedelta(1,unit='ns')

results in

86400000000000 nanoseconds
1 nanoseconds
1 nanoseconds
1000000000 nanoseconds
1000000 nanoseconds
1000 nanoseconds
1 nanoseconds

version: 0.14.0

Most likely related to Issue #6423

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions