Skip to content

Commit e9129f8

Browse files
jbrockmendelclaude
andcommitted
Fix CI: use non-deprecated _inferred_freq_str in dt64arr_to_periodarr
The Series.dt.freq deprecation forced the internal caller in dt64arr_to_periodarr off data.dt.freq, but it landed on data._values.inferred_freq, which is itself deprecated (GH#64679). That tripped the Pandas4Warning under -W error in CI. Use the non-deprecated internal _inferred_freq_str instead, which returns the identical value the original data.dt.freq did. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 438d58f commit e9129f8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pandas/core/arrays/period.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1474,7 +1474,7 @@ def dt64arr_to_periodarr(
14741474
if isinstance(data, ABCIndex):
14751475
data, freq = data._values, data.freq
14761476
elif isinstance(data, ABCSeries):
1477-
data, freq = data._values, data._values.inferred_freq
1477+
data, freq = data._values, data._values._inferred_freq_str
14781478

14791479
elif isinstance(data, (ABCIndex, ABCSeries)):
14801480
data = data._values

0 commit comments

Comments
 (0)