Skip to content

Commit

Permalink
fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Wardle committed May 22, 2024
1 parent 2b3363f commit 5e24396
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions python/DataFrameWrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,18 @@ def Get(self, object_name):
if not hasattr(self, "df"):
raise AttributeError("Dataframe has not been loaded")

#index_labels, column_labels = object_name.split(",")
# Not necessary to include ":nominal,sum_w:sum_ww in every line
# index_labels, column_labels = object_name.split(",")
# Not necessary to include ":nominal,sum_w:sum_ww in every line
# check if its not there and if so, add these default names of columns
try:
index_labels, column_labels = object_name.split(",")
except:
index_labels = object_name
except ValueError:
index_labels = object_name
column_labels = ""
if len(column_labels)==0: column_labels="sum_w:sum_ww"
if len(index_labels.split(":")) < 3 : index_labels+=":nominal"
if len(column_labels) == 0:
column_labels = "sum_w:sum_ww"
if len(index_labels.split(":")) < 3:
index_labels += ":nominal"

# Try to cast index_labels into self.df.index dtypes. Users can only
# input index_labels as a string, but the dataframe might have other
Expand Down

0 comments on commit 5e24396

Please sign in to comment.