Skip to content

Commit 3d94d45

Browse files
committed
1 parent 4401bec commit 3d94d45

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sdks/python/apache_beam/dataframe/frames.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
'DeferredDataFrame',
5656
]
5757

58+
# Get major, minor version
59+
PD_VERSION = tuple(map(int, pd.__version__.split('.')[0:2]))
60+
5861

5962
def populate_not_implemented(pd_type):
6063
def wrapper(deferred_type):
@@ -2207,8 +2210,8 @@ def aggregate(self, func, axis, *args, **kwargs):
22072210
if func in ('quantile',):
22082211
return getattr(self, func)(*args, axis=axis, **kwargs)
22092212

2210-
# Maps to a property, args are ignored
2211-
if func in ('size',):
2213+
# In pandas<1.3.0, maps to a property, args are ignored
2214+
if func in ('size',) and PD_VERSION < (1,3):
22122215
return getattr(self, func)
22132216

22142217
# We also have specialized distributed implementations for these. They only

0 commit comments

Comments
 (0)