Skip to content

Commit 208bc03

Browse files
author
MomIsBestFriend
committed
Reverted wrong code
REF: #31808 (comment)
1 parent 4f600f9 commit 208bc03

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/_libs/tslibs/period.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ cdef int64_t get_daytime_conversion_factor(int from_index, int to_index) nogil:
142142
int col = max_value(from_index, to_index)
143143
# row or col < 6 means frequency strictly lower than Daily, which
144144
# do not use daytime_conversion_factors
145-
if row < 6 or col < 6:
145+
if row < 6:
146+
return 0
147+
elif col < 6:
146148
return 0
147149
return daytime_conversion_factor_matrix[row - 6][col - 6]
148150

0 commit comments

Comments
 (0)