Answered You can hire a professional tutor to get the answer.

QUESTION

import CSV import matp Lot Lib . pyplot as pit data = [ ] with open ( ' attack_ type_ frequency . CSV' ,' r') as to : reader = csV . reader ( fp ,...

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[1]) 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 [1] ) 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 )
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question