Skip to content

Commit

Permalink
auto linting
Browse files Browse the repository at this point in the history
  • Loading branch information
serengil committed Dec 23, 2023
1 parent dedfb28 commit fd0d0dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chefboost/training/Training.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,12 @@ def buildDecisionTree(

if df.Decision.dtypes == "object": # classification
pivot = pd.DataFrame(subdataset.Decision.value_counts()).reset_index()

if pd.__version__.split(".")[0] == "1":
pivot = pivot.rename(columns={"Decision": "Instances", "index": "Decision"})
else: # if pd.__version__.split(".")[0] == "2":
else: # if pd.__version__.split(".")[0] == "2":
pivot = pivot.rename(columns={"Decision": "Instances", "count": "Decision"})

pivot = pivot.sort_values(by=["Instances"], ascending=False).reset_index()

else_decision = f"return '{pivot.iloc[0].Decision}'"
Expand Down

0 comments on commit fd0d0dd

Please sign in to comment.