Closed gicmo closed 6 years ago
Todo List:
Cell
inherit from Variant
Do we also want to offer some sugar? Things like to and from csv? Can be added later on, of course.
Do we also want to offer some sugar? Things like to and from csv? Can be added later on, of course.
Yeah, I would add that later. But sounds not like a bad idea. The csv import/export could be used by the FS backend as well.
Do we want a per-column "type" (not DataType, but as in the second parameter of the DataArray/Block/Group)? A "definition"?
Good question. I would expect the DataFrame to have a single type and description attribute like any other object, but since the data isn't homogeneous, it might useful to be able to specify a description for each. But it also gets a bit messy, doesn't it? Having attributes for each column in this way kinda breaks the idea of a unified table object.
I would lean towards not having type and description per column unless I hear a very compelling argument or example.
This is getting close. I guess some more tests are needed, but besides that it is basically ready. Review away ;)
Is there any straightforward way to delete a specific row or column?
Column might be tricky, I am not sure we can alter it, from the docu:
When a dataset is created, the storage datatype is defined. After the dataset or attribute is created, the datatype cannot be changed.
Rows of course should be doable. You think something like DataFrame::deleteRow(ndsize_t index)
?
Yeah, delete row should be supported like you mentioned, just an index, or a range that deletes and shifts the rest "up".
As for column, yeah, I wasn't thinking implementation and deleting a common would be a pain. Probably easier to create a new one and copy the rest over, which is horrible.
This is a test balloon to see where if (I am sure it will) breaks on other platforms (win?). It is mostly done. Mostly. Need more tests, as always. Feedback on the API would also be good. Some bits are missing and some are to be discussed:
rows(NEW_SIZE)
)?