Skip to content

Commit

Permalink
SNOW-1445536: Remove StringMethods and DatetimeProperties (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-joshi authored May 29, 2024
1 parent a8208d9 commit dbb0713
Show file tree
Hide file tree
Showing 4 changed files with 255 additions and 605 deletions.
16 changes: 14 additions & 2 deletions src/snowflake/snowpark/modin/pandas/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2335,7 +2335,13 @@ def dt(self): # noqa: RT01, D200
if not is_datetime64_any_dtype(current_dtype):
raise AttributeError("Can only use .dt accessor with datetimelike values")

from .series_utils import DatetimeProperties
from modin.pandas.series_utils import DatetimeProperties

if DatetimeProperties._Series is not Series:
del (
DatetimeProperties._Series
) # Replace modin's Series class with Snowpark pandas Series
DatetimeProperties._Series = Series

return DatetimeProperties(self)

Expand Down Expand Up @@ -2468,7 +2474,13 @@ def str(self): # noqa: RT01, D200
if not is_string_dtype(current_dtype):
raise AttributeError("Can only use .str accessor with string values!")

from .series_utils import StringMethods
from modin.pandas.series_utils import StringMethods

if StringMethods._Series is not Series:
del (
StringMethods._Series
) # Replace modin's Series class with Snowpark pandas Series
StringMethods._Series = Series

return StringMethods(self)

Expand Down
Loading

0 comments on commit dbb0713

Please sign in to comment.