Skip to content

Commit 0bcb77c

Browse files
committed
4161 - Fix TRex dataframe cleanup function
Fix 'clean_df' function in 'trex/df_preprocessing.py' module which misbehaves not selecting any existing columns to delete in order to cleanup dataframe for visualization. Resolves: NVIDIA#4161 Signed-off-by: Tigran Grigoryan <[email protected]>
1 parent 08ad45b commit 0bcb77c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/experimental/trt-engine-explorer/trex/df_preprocessing.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@ def drop_columns(df: pd.DataFrame, columns: list):
254254

255255
def clean_df(df: pd.DataFrame, inplace=True) -> pd.DataFrame:
256256
clean_io(df)
257-
columns = set([col for col_list in layer_attributes.keys() for col in col_list])
257+
lists = [list(layer.keys()) for layer in layer_attributes.values()]
258+
columns = {key for list_ in lists for key in list_}
258259
drop_columns(df, columns)
259260
df.fillna(0, inplace=inplace)
260261
return df

0 commit comments

Comments
 (0)