Closed rly closed 3 years ago
In the first failing test above:
python -m unittest test_hierarchical_dynamic_table_mixin.TestHierarchicalDynamicTableMixin.test_to_denormalized_dataframe
TypeError: unhashable type: 'list'
curr = self.table_level1.to_denormalized_dataframe(flat_column_index=False)
ref = pandas.read_hdf(path_or_buf=ref_filename,
key='test_to_denormalized_dataframe_table_level1')
pandas.testing.assert_frame_equal(curr, ref)
(Pdb) curr
source_table level1 level0 t m
label id tag tags id ags yid
0 0 tag1 (tag1, tag2) 10 [tag1] 0
1 0 tag1 (tag1, tag2) 11 [tag2] 1
2 1 tag2 (tag2, tag1) 12 [[tag2, tag1]] [2]
3 2 tag2 (tag3, tag4, tag5) 13 [[tag3, tag4, tag5]] [3]
(Pdb) ref
source_table level1 level0 t m
label id tag tags id ags yid
0 0 tag1 (tag1, tag2) 10 [tag1] 0
1 0 tag1 (tag1, tag2) 11 [tag2] 1
2 1 tag2 (tag2, tag1) 12 [tag2, tag1] 2
3 2 tag2 (tag3, tag4, tag5) 13 [tag3, tag4, tag5] 3
I see two issues:
1) the names of the columns is incorrect
2) rows 2 and 3 of curr
have lists of lists in the last two columns
@oruebel Do you have any ideas as to the root cause?
Fixed in merge of the extension with PyNWB and HDMF
Using PyNWB 1.4.0 and HDMF 2.2.0, tests fail:
Looks related to conversion to Pandas data frames.