- craftutils.wrap.dragons.Table.remove_column(name)
Remove a column from the table.
This can also be done with:
del table[name]Parameters¶
- namestr
Name of column to remove
Examples¶
Create a table with three columns ‘a’, ‘b’ and ‘c’:
>>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3], ['x', 'y', 'z']], ... names=('a', 'b', 'c')) >>> print(t) a b c --- --- --- 1 0.1 x 2 0.2 y 3 0.3 zRemove column ‘b’ from the table:
>>> t.remove_column('b') >>> print(t) a c --- --- 1 x 2 y 3 zTo remove several columns at the same time use remove_columns.