Exemple #1
0
 def test_json_list(self):
     txt = df1.to_json(pretty=False)
     df2 = Table.from_json(txt)
     self.assertEqual(df2.columns, cols)
     self.assertEqual(df2.rowcnt, df1.rowcnt)
     self.assertEqual(df2['weight'].sum(), df1['weight'].sum())
Exemple #2
0
 def test_json_dict_pretty(self):
     txt = df1.to_json(as_dict=True, pretty=True)
     df2 = Table.from_json(txt)
     self.assertEqual(df2.columns, cols)
     self.assertEqual(df2.rowcnt, df1.rowcnt)
     self.assertEqual(df2['weight'].sum(), df1['weight'].sum())