Skip to content

Commit eda4ad7

Browse files
committed
fix Python pandas errors
1 parent 68824e5 commit eda4ad7

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

explorer/dxt.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def create_dataframe(
298298
temp_result["end"] = temp_result["end"].round(decimals=4)
299299

300300
temp_result.index.name = "segment"
301-
temp_result.reset_index(inplace=True)
301+
temp_result = temp_result.reset_index()
302302
temp_result = temp_result.reindex(columns=column_names)
303303

304304
df.append(temp_result)
@@ -327,7 +327,7 @@ def create_dataframe(
327327
temp_result["end"] = temp_result["end"].round(decimals=4)
328328

329329
temp_result.index.name = "segment"
330-
temp_result.reset_index(inplace=True)
330+
temp_result = temp_result.reset_index()
331331
temp_result = temp_result.reindex(columns=column_names)
332332

333333
df.append(temp_result)
@@ -513,7 +513,8 @@ def merge_overlapping_io_phases(self, overlapping_df, df, module):
513513
threshold,
514514
]
515515

516-
io_phases_df.dropna(inplace=True)
516+
io_phases_df = io_phases_df.dropna()
517+
517518
return io_phases_df
518519

519520
def calculate_io_phases(

explorer/plots/operation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,8 @@ def determine_legend(fig, column):
229229
if df.empty:
230230
quit()
231231

232-
df["osts"].fillna(value="-", inplace=True)
233-
df.drop(df.tail(2).index, inplace=True)
232+
df["osts"] = df["osts"].fillna("-")
233+
df = df.iloc[:-2] # TODO: review why this is needed
234234

235235
if not options["graph_type"]:
236236
if options["start"] is not None:

0 commit comments

Comments
 (0)