Skip to content

Commit 28b8424

Browse files
SNOW-2679281: Add missing tests and changelog entries for dt.dayofweek/weekday/dayofyear/isocalendar in faster pandas
1 parent fb11f03 commit 28b8424

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@
124124
- `dt.month_name`
125125
- `dt.day_name`
126126
- `dt.strftime`
127+
- `dt.dayofweek`
128+
- `dt.weekday`
129+
- `dt.dayofyear`
130+
- `dt.isocalendar`
127131
- `rolling.min`
128132
- `rolling.max`
129133
- `rolling.count`

tests/integ/modin/test_faster_pandas.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,9 @@ def test_str_translate(session):
12491249
"is_leap_year",
12501250
"days_in_month",
12511251
"daysinmonth",
1252+
"dayofweek",
1253+
"weekday",
1254+
"dayofyear",
12521255
],
12531256
)
12541257
@sql_count_checker(query_count=3)
@@ -1296,7 +1299,7 @@ def test_dt_properties(session, property_name):
12961299
assert_series_equal(snow_result, native_result)
12971300

12981301

1299-
@pytest.mark.parametrize("func", ["normalize", "month_name", "day_name"])
1302+
@pytest.mark.parametrize("func", ["normalize", "month_name", "day_name", "isocalendar"])
13001303
@sql_count_checker(query_count=3)
13011304
def test_dt_functions_no_params(session, func):
13021305
with session_parameter_override(
@@ -1338,7 +1341,10 @@ def test_dt_functions_no_params(session, func):
13381341
native_result = getattr(native_df["A"].dt, func)()
13391342

13401343
# compare results
1341-
assert_series_equal(snow_result, native_result)
1344+
if func == "isocalendar":
1345+
assert_frame_equal(snow_result, native_result, check_dtype=False)
1346+
else:
1347+
assert_series_equal(snow_result, native_result)
13421348

13431349

13441350
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)