Skip to content

Commit

Permalink
fix(python): Fix return type for methods in Series.dt namespace
Browse files Browse the repository at this point in the history
Fix return type for `millennium`, `century` and `combine` methods
  • Loading branch information
Terrigible committed Dec 24, 2024
1 parent 0ae3fe8 commit 59b2994
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions py-polars/polars/series/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def strftime(self, format: str) -> Series:
"""
return self.to_string(format)

def millennium(self) -> Expr:
def millennium(self) -> Series:
"""
Extract the millennium from underlying representation.
Expand All @@ -383,8 +383,8 @@ def millennium(self) -> Expr:
Returns
-------
Expr
Expression of data type :class:`Int32`.
Series
Series of data type :class:`Int32`.
Examples
--------
Expand All @@ -411,7 +411,7 @@ def millennium(self) -> Expr:
]
"""

def century(self) -> Expr:
def century(self) -> Series:
"""
Extract the century from underlying representation.
Expand All @@ -421,8 +421,8 @@ def century(self) -> Expr:
Returns
-------
Expr
Expression of data type :class:`Int32`.
Series
Series of data type :class:`Int32`.
Examples
--------
Expand Down Expand Up @@ -1924,7 +1924,7 @@ def round(self, every: str | dt.timedelta | IntoExprColumn) -> Series:
]
"""

def combine(self, time: dt.time | Series, time_unit: TimeUnit = "us") -> Expr:
def combine(self, time: dt.time | Series, time_unit: TimeUnit = "us") -> Series:
"""
Create a naive Datetime from an existing Date/Datetime expression and a Time.
Expand Down

0 comments on commit 59b2994

Please sign in to comment.