def resize(self, nrows, front=False):
nrows_current = self.get_nrows()<EOL>if nrows == nrows_current:<EOL><INDENT>return<EOL><DEDENT>if nrows < nrows_current:<EOL><INDENT>rowdiff = nrows_current - nrows<EOL>if front:<EOL><INDENT>start = <NUM_LIT:0><EOL>stop = rowdiff<EOL><DEDENT>else:<EOL><INDENT>start = nrows<EOL>stop = nrows_current<EOL><DEDENT>self.delete_rows(slice(start, stop))<EOL><DEDENT>else:<EOL><INDENT>rowdiff = nrows - nrows_current<EOL>if front:<EOL><INDENT>firstrow = <NUM_LIT:0><EOL><DEDENT>else:<EOL><INDENT>firstrow = nrows_current<EOL><DEDENT>self._FITS.insert_rows(self._ext+<NUM_LIT:1>, firstrow, rowdiff)<EOL><DEDENT>self._update_info()<EOL>
Resize the table to the given size, removing or adding rows as
necessary.  Note if expanding the table at the end, it is more
efficient to use the append function than resizing and then
writing.

New added rows are zerod, except for 'i1', 'u2' and 'u4' data types
which get -128,32768,2147483648 respectively


parameters
----------
nrows: int
    new size of table
front: bool, optional
    If True, add or remove rows from the front.  Default
    is False