The code I have currently, gets all the information from the CSV…
Question Answered step-by-step The code I have currently, gets all the information from the CSV… The code I have currently, gets all the information from the CSV file and puts it into a dictionary. I need to find the 3D distance between all the ID’s locations and put them into a dictionary that could look something like this, p = {‘R03’: {‘any letter’: {Insert 3D distance between point a and point b}, ‘P13’: {‘any letter’: {Insert 3D distance between point a and point b…etc}}}def main(csvfile, a): f=open(‘Testing file.csv’,’r’)data=f.readlines()dictionary={}for i in range(1,len(data)):list_row=data[i][:-1].split(‘,’)if (list_row[0] not in dictionary):dictionary[list_row[0]]={}dictionary[list_row[0]][list_row[1]]={}dictionary[list_row[0]][list_row[1]][‘x’]=float(list_row[2])dictionary[list_row[0]][list_row[1]][‘y’]=float(list_row[3])dictionary[list_row[0]][list_row[1]][‘z’]=float(list_row[4])answer correctly and step by step otherwise I will give downvote and don’t use unblur from other sites Engineering & Technology Computer Science CPSC MISC Share QuestionEmailCopy link Comments (0)


