How to use the pynwb.core.DynamicTable function in pynwb

To help you get started, we’ve selected a few pynwb examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_core.py View on Github external
def test_auto_ragged_array(self):

        df = pd.DataFrame({'a': [[1], [1, 2]]})
        df2 = DynamicTable.from_dataframe(df, name='test').to_dataframe()
        df.equals(df2)
github NeurodataWithoutBorders / pynwb / tests / unit / test_core.py View on Github external
def with_columns_and_data(self):
        columns = [
            VectorData(name=s['name'], description=s['description'], data=d)
            for s, d in zip(self.spec, self.data)
        ]
        return DynamicTable("with_columns_and_data", 'a test table', columns=columns)
github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_core.py View on Github external
def test_constructor_ids_bad_ids(self):
        columns = [VectorData(name=s['name'], description=s['description'], data=d)
                   for s, d in zip(self.spec, self.data)]
        msg = "must provide same number of ids as length of columns"
        with self.assertRaisesRegex(ValueError, msg):
            DynamicTable("with_columns", 'a test table', id=[0, 1], columns=columns)
github NeurodataWithoutBorders / pynwb / tests / unit / test_core.py View on Github external
def test_constructor_ids(self):
        columns = [VectorData(name=s['name'], description=s['description'], data=d)
                   for s, d in zip(self.spec, self.data)]
        table = DynamicTable("with_columns", 'a test table', id=[0, 1, 2, 3, 4], columns=columns)
        self.check_table(table)
github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_core.py View on Github external
def with_spec(self):
        table = DynamicTable("with_spec", 'a test table', columns=self.spec)
        return table
github NeurodataWithoutBorders / pynwb / tests / unit / test_core.py View on Github external
def test_constructor_ids_default(self):
        columns = [VectorData(name=s['name'], description=s['description'], data=d)
                   for s, d in zip(self.spec, self.data)]
        table = DynamicTable("with_spec", 'a test table', columns=columns)
        self.check_table(table)
github NeurodataWithoutBorders / pynwb / tests / unit / pynwb_tests / test_core.py View on Github external
def with_columns_and_data(self):
        columns = [
            VectorData(name=s['name'], description=s['description'], data=d)
            for s, d in zip(self.spec, self.data)
        ]
        return DynamicTable("with_columns_and_data", 'a test table', columns=columns)