Skip to content

Commit

Permalink
fix(python): Fix return type for add_business_days, millennium, `…
Browse files Browse the repository at this point in the history
…century` and `combine` methods in `Series.dt` namespace (#20436)
  • Loading branch information
Terrigible authored Dec 24, 2024
1 parent c6769c2 commit bdc597f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions py-polars/polars/series/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def add_business_days(
Returns
-------
Expr
Series
Data type is preserved.
Examples
Expand Down 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 bdc597f

Please sign in to comment.