Skip to content

Commit 6902697

Browse files
committed
Timedeltas: Understand µs
1 parent 75e9598 commit 6902697

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

doc/source/whatsnew/v1.1.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ Other
407407
- Fixed bug in :func:`pandas.testing.assert_series_equal` where dtypes were checked for ``Interval`` and ``ExtensionArray`` operands when ``check_dtype`` was ``False`` (:issue:`32747`)
408408
- Bug in :meth:`Series.map` not raising on invalid ``na_action`` (:issue:`32815`)
409409
- Bug in :meth:`DataFrame.__dir__` caused a segfault when using unicode surrogates in a column name (:issue:`25509`)
410+
- Timedeltas now understand µs as identifier for microsecond (:issue:`32899`)
410411

411412
.. ---------------------------------------------------------------------------
412413

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ cdef dict timedelta_abbrevs = {
8282
"us": "us",
8383
"microseconds": "us",
8484
"microsecond": "us",
85+
"µs": "us",
8586
"micro": "us",
8687
"micros": "us",
8788
"u": "us",

pandas/tests/scalar/timedelta/test_constructors.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def test_construction():
5151
assert Timedelta("1 milli") == timedelta(milliseconds=1)
5252
assert Timedelta("1 millisecond") == timedelta(milliseconds=1)
5353
assert Timedelta("1 us") == timedelta(microseconds=1)
54+
assert Timedelta("1 µs") == timedelta(microseconds=1)
5455
assert Timedelta("1 micros") == timedelta(microseconds=1)
5556
assert Timedelta("1 microsecond") == timedelta(microseconds=1)
5657
assert Timedelta("1.5 microsecond") == Timedelta("00:00:00.000001500")

0 commit comments

Comments
 (0)