Skip to content

Commit 2ea1056

Browse files
committed
Fix pandas FutureWarning
1 parent a82630e commit 2ea1056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/modules/OutputFormat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def df_output_filters(df, df_columns, only_open_ports):
128128
df = df.loc[df['State Port'] == 'open']
129129

130130
# Convert 'Port' to int for proper sorting
131-
df['Port'] = df['Port'].astype(int)
131+
df[df.columns[df.columns.get_loc('Port')]] = df['Port'].astype(int)
132132

133133
# Sort final dataframe by 'IP' and then 'Port'
134134
df = df.sort_values(by=['IP', 'Port'])

0 commit comments

Comments
 (0)