Skip to content

Commit

Permalink
Remove deprecated week and weekofyear for Pandas 2 (#28492)
Browse files Browse the repository at this point in the history
  • Loading branch information
caneff authored Sep 20, 2023
1 parent 93c3224 commit a7335cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdks/python/apache_beam/dataframe/frames.py
Original file line number Diff line number Diff line change
Expand Up @@ -5377,11 +5377,12 @@ def func(df, *args, **kwargs):
'second',
'time',
'timetz',
'week',
'weekday',
'weekofyear',
'year',
]
# Pandas 2 removed these.
if PD_VERSION < (2, 0):
ELEMENTWISE_DATETIME_PROPERTIES += ['week', 'weekofyear']

for method in ELEMENTWISE_DATETIME_PROPERTIES:
setattr(_DeferredDatetimeMethods,
Expand Down

0 comments on commit a7335cb

Please sign in to comment.