Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
design
#5
(Aug-26-2021, 03:15 PM)deanhystad Wrote: This does not look like differences. P2 is the same for all three machines. The value of P1 is different for Machine2, but Machine1 and Machine3 are the same.

It looks like all you really want is a table with the machine as columns and the parameter as rows.

Yes sorry thats the formatting - the differences were highlighted in original response - but didnt show up.
Any output is fine ...... the tabular approach is just preffered ... but it can even be as simple as

machine1, p1, dog
machine1, p2, 3
machine1, p3, 1
machine2, p1, cat
machine2, p2, 3
machine2, p3, 2
machine3, p1, dog
machine3, p2, 3
machine3, p3, 4

Machine2 value for p1 is cat and differs from machie1.
Machine2 value for p3 is 1and differs from machine1.
Machine3 value for p3 is 4 and differs from machine 1

I was just struggling with how to do this
eg this code makes sense
for k,v in firstdict.iteritems():
if k in seconddict and seconddict[k] != v:
print("Key: {}, Value: {}".format(k, seconddict[k]))


But then I need 3 separate dictionaries ........ wasnt sure if thats the right way to go. Simpler way.
Reply


Messages In This Thread
design - by fakka - Aug-26-2021, 01:14 PM
RE: design - by deanhystad - Aug-26-2021, 02:41 PM
RE: design - by fakka - Aug-26-2021, 03:02 PM
RE: design - by deanhystad - Aug-26-2021, 03:15 PM
RE: design - by fakka - Aug-26-2021, 03:24 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020