Skip to content

Commit

Permalink
Typing
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed May 31, 2024
1 parent e2f2e70 commit 35fbace
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py-polars/polars/interchange/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ def polars_dtype_to_dtype(dtype: PolarsDataType) -> Dtype:


def _datetime_to_dtype(dtype: Datetime) -> Dtype:
tu = dtype.time_unit[0] if dtype.time_unit is not None else "u"
tu = dtype.time_unit[0]
tz = dtype.time_zone if dtype.time_zone is not None else ""
arrow_c_type = f"ts{tu}:{tz}"
return DtypeKind.DATETIME, 64, arrow_c_type, NE


def _duration_to_dtype(dtype: Duration) -> Dtype:
tu = dtype.time_unit[0] if dtype.time_unit is not None else "u"
tu = dtype.time_unit[0]
arrow_c_type = f"tD{tu}"
return DtypeKind.DATETIME, 64, arrow_c_type, NE

Expand Down

0 comments on commit 35fbace

Please sign in to comment.