remove extra columns
},
{
"cell_type": "code",
- "execution_count": 26,
+ "execution_count": 27,
"metadata": {},
"outputs": [
{
"text": [
"Number of original records: 14261\n",
"\n",
- "Fields/Values in first record (row): {'layers': '[<ETH Layer>, <IP Layer>, <UDP Layer>, <DATA Layer>, <FRAME_RAW Layer>, <ETH_RAW Layer>, <IP_RAW Layer>, <UDP_RAW Layer>, <DATA_RAW Layer>]', 'eth.src.oui_resolved': 'Sophos Ltd', 'eth.dst.oui_resolved': 'Quanta Computer Inc.', 'ip.src': '217.174.56.245', 'ip.dst': '172.16.255.1', 'Last Layer': 'DATA_RAW', 'Combined IPs': '217.174.56.245:172.16.255.1'}\n",
+ "Fields/Values in first record (row): {'layers': '[<ETH Layer>, <IP Layer>, <TCP Layer>, <HTTP Layer>, <FRAME_RAW Layer>, <ETH_RAW Layer>, <IP_RAW Layer>, <TCP_RAW Layer>, <HTTP_RAW Layer>]', 'eth.src.oui_resolved': 'Realtek (UpTech? also reported)', 'eth.dst.oui_resolved': 'PCS Computer Systems GmbH', 'Last Layer': 'HTTP_RAW', 'Combined IPs': '96.17.8.49:10.0.2.15'}\n",
"\n",
"Number of records after deduplication: 708\n",
"\n"
" if 'ip.src' in row and 'ip.dst' in row:\n",
" # combine two fields with a colon, making a new field\n",
" row[combined_ips] = row['ip.src']+':'+row['ip.dst']\n",
+ " # remove ip.src and ip.dst now that we have them\n",
+ " del row['ip.src']\n",
+ " del row['ip.dst']\n",
" \n",
" # remove duplicate rows\n",
" rows = [dict(t) for t in {tuple(d.items()) for d in rows}]\n",
