Open the pcap, add data to the columns by clicking on the packet bytes and right click > Apply to column where it it highlights. Remove the other columns then go to File > Export Packet > Dissections > As CSV. Remove the odd data such as Value, the white space and the odd data parts. Remove the speech marks with 'sed -i 's/"//g' . Then run this script on it