[AstroPy] astropy.table remove/delete row?

Brian Kloppenborg bkloppenborg at gmail.com
Wed Jun 26 08:05:55 EDT 2013


Greetings,

Today I noticed the astropy.table class (
http://docs.astropy.org/en/latest/_generated/astropy.table.table.Table.html#astropy.table.table.Table)
implements many functions for manipulating tables:
add_column
add_columns
add_row
remove_column
remove_columns

but it lacks similar functionality for row manipulation:

add_rows - although this is easily accomplished by iteration
remove_row
remove_rows

I could try manipulating the table._data structure directly, but because
_data can be a numpy ndarray, dict, list or Table, it is not clear which
method I should use without inspecting the data structure.

I thought about slicing the table, but this would involve splitting then
reassembling the table just to remove one row. I considered creating a
mask, but this seems tedious (i.e. something that should be implemented
via. a remove_row(s) function)

Is a lack of a remove/delete_row(s) missing functionality or am I
missing something obvious?

Thanks,
Brian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20130626/e34ab7e4/attachment.html>


More information about the AstroPy mailing list