hdmf icon indicating copy to clipboard operation
hdmf copied to clipboard

[Feature]: Allow initializing DynamicTable with req/opt cols more directly

Open rly opened this issue 2 years ago • 1 comments

What would you like to see added to HDMF?

Given a subclass of DynamicTable with required and/or optional columns, the autogenerated Python class should allow something like the below:

ContactTable(
	name="contacts",
	description="description",
	contact_ids=["1","2"],
	contact_shapes=["circle", "square"],
	contact_shape_params=[10.0, 20.0],
	contact_plane_axes=[[[1,2],[3,4]],[[4,2],[2,1]]],
	contact_positions=[[1,2], [3,3]],
	contact_annotations=["blah","b"],
	device_channel_indices=[0,1]
)

Is your feature request related to a problem?

No response

What solution would you like?

see above

Do you have any interest in helping implement the feature?

Yes.

Code of Conduct

rly avatar Jul 27 '23 20:07 rly

Now that there are efforts to standardize the data frame API another related and useful feature would be to build a dynamic table from a data frame directly:

https://data-apis.org/dataframe-api/draft/

Before, this would probably coupled the code too much to pandas (being the most popular data frame out there).

h-mayorquin avatar Nov 12 '24 15:11 h-mayorquin