Python how to compare data like in PHP arrays -
i have compare different operations results on 2 data sources using python.
for each datasource, tables names. each table, columns. each column, 'operations' getting count(column), sum(column). example, in php, have given type of array:
---------------------------------------------------- [table1][col1][operation1][value] [table1][col1][operation2][value] [table1][col1][operation3][value] ---------------------------------------------------- [table1][col2][operation1][value] [table1][col2][operation2][value] [table1][col2][operation3][value] ---------------------------------------------------- [table2][col1][operation1][value] [table2][col1][operation2][value] [table2][col1][operation3][value] ---------------------------------------------------- [table2][col2][operation1][value] [table2][col2][operation2][value] [table2][col2][operation3][value] ----------------------------------------------------
i need compare results of operations between 2 data sources, means verify if tables , columns exist on each one, , compare result of 'operation'. have tried find way how realise using objects don't know how. have idea?
if want know if results same, use ==
. example
dict1 = {'foo':'bar'} dict2 = {'foo':'baz'} dict1 == dict2 # false dict2 = {'foo':'bar'} dict1 == dict2 # true
Comments
Post a Comment