Import Csv Import Matp Lot Lib Pyplot As Pit Data With Open Attack Type Freque
Can someone please explain to me what I am doing wrong/what I am missing to be able to output a graph. I am getting an error: [float(dd) for dd in data[1:]] from like 8 down. I have attached a sample of the data
- Attachment 1
- Attachment 2
import CSVimport matp Lot Lib . pyplot as pitdata = [ ]with open ( ‘ attack_ type_ frequency . CSV’ ,’ r’) as to :reader = csV . reader ( fp , deLimiter = ‘ It ‘ )for row in reader :data . append ( row )DOS = [ float ( dd [ 1 ] ) for ad in data [ 1 : ]]UZR = [ float ( dd  ) for ad in data [ 1 : ] ]R 21 = [ float ( dd [ 1 ] ) for ad in data [ 1 : ]]PROBE = [ float ( dd [ 1 ] ) for ad in data [ 1 : ]]fig , ax = pit . subplots ( figsize = ( 10 , 5 ) , dpi = 100 )ax . scatter(DOS , UZR, R21 , PROBE , alpha = 0 . 7, 5 = 150 , edgecolor=’ yellow’ )ax . set_ * label( " Attack number detected " , fontsize = 12 )ax . set_ y label ( " Attack frequency " , fontsize = 12 )
Need your ASSIGNMENT done? Use our paper writing service to score good grades and meet your deadlines.
Order a Similar Paper Order a Different Paper