Skip to content

Commit

Permalink
fix: Reworked dataframe to avoid chained assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyThomsonMonash committed Mar 14, 2024
1 parent 09c53d6 commit 77b322f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions map2loop/map2model_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ def run(self, verbose_level: VerboseLevel = None):
df[0] = list(df[0].str.replace("^[0-9]*, ", "", regex=True))
df[0] = list(df[0].str.replace(", ", "", regex=False))
df[0] = "Fault_" + df[0]
for j in range(len(df)):
df[1][j] = [i.strip("()").replace(" ", "").split(",") for i in df[1][j]]
relations = df[1]
for j in range(len(relations)):
relations[j] = [i.strip("()").replace(" ", "").split(",") for i in relations[j]]
df[1] = relations

for _, row in df.iterrows():
for i in numpy.arange(len(row[1])):
Expand Down

0 comments on commit 77b322f

Please sign in to comment.