File tree 2 files changed +4
-3
lines changed
sdks/python/apache_beam/dataframe
2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 25
25
from apache_beam .dataframe import frame_base
26
26
from apache_beam .dataframe import frames
27
27
28
- PD_VERSION = tuple (map (int , pd .__version__ .split ('.' )))
28
+ # Get major, minor version
29
+ PD_VERSION = tuple (map (int , pd .__version__ .split ('.' )[0 :2 ]))
29
30
30
31
GROUPBY_DF = pd .DataFrame ({
31
32
'group' : ['a' if i % 5 == 0 or i % 3 == 0 else 'b' for i in range (100 )],
Original file line number Diff line number Diff line change @@ -494,8 +494,8 @@ def test_series_tests(self):
494
494
self .assertEqual (result .failed , 0 )
495
495
496
496
def test_string_tests (self ):
497
- PD_VERSION = tuple (int (v ) for v in pd .__version__ .split ('.' ))
498
- if PD_VERSION < (1 , 2 , 0 ):
497
+ PD_VERSION = tuple (int (v ) for v in pd .__version__ .split ('.' )[: 2 ] )
498
+ if PD_VERSION < (1 , 2 ):
499
499
module = pd .core .strings
500
500
else :
501
501
# Definitions were moved to accessor in pandas 1.2.0
You can’t perform that action at this time.
0 commit comments