File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 23
23
runs-on : ubuntu-latest
24
24
strategy :
25
25
matrix :
26
- python-version : [3.8 ]
26
+ python-version : [3.9 ]
27
27
28
28
steps :
29
29
- uses : actions/checkout@v3
47
47
runs-on : ubuntu-latest
48
48
strategy :
49
49
matrix :
50
- python-version : [3.8 ]
50
+ python-version : [3.9 ]
51
51
52
52
steps :
53
53
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ def load_module(module_name: str) -> ModuleType:
12
12
Returns:
13
13
module (ModuleType)
14
14
"""
15
- if sys .version_info >= (3 , 11 ):
15
+ if sys .version_info >= (3 , 9 ):
16
16
import importlib .util
17
17
18
- spec = importlib .util .find_spec (module_name )
18
+ spec = importlib .util .find_spec (module_name . replace ( "/" , "." ) )
19
19
if spec is None :
20
20
raise ImportError (f"Module '{ module_name } ' not found" )
21
21
Original file line number Diff line number Diff line change @@ -557,7 +557,10 @@ def buildDecisionTree(
557
557
# ---------------------------
558
558
# add else condition in the decision tree
559
559
if df .Decision .dtypes == "object" : # classification
560
- pivot = pd .DataFrame (df .Decision .value_counts ()).sort_values (by = ["count" ], ascending = False )
560
+ # value_counts return count label in 3.8, and Decision label in 3.9
561
+ df_summary = pd .DataFrame (df .Decision .value_counts ())
562
+ count_label = df_summary .columns [0 ]
563
+ pivot = df_summary .sort_values (by = [count_label ], ascending = False )
561
564
else_decision = f"return '{ str (pivot .iloc [0 ].name )} '"
562
565
563
566
if enableParallelism != True :
You can’t perform that action at this time.
0 commit comments