I am trying to convert(pcap data) packetList to dataframe so that i can perform preprocessing on it. I have used scapy library to read pcap file.
import pandas as pd
from scapy.all import *
packets_list=rdpcap('D:/anaconda/path/youtube2.pcap')
//return type PacketList
print(packets_list[3].show()) //Display contents of the packet
df = pd.DataFrame (packets_list,columns=
['No.','Time','Source','Destination','Protocol','Length','Info'])
print (df)
ERROR:
TypeError: DataFrame constructor called with incompatible data and dtype: cannot copy sequence with size 66 to array axis with dimension 1
Please help anyone.