def add_row(self, data: list=None):
<EOL>if self.headers and data:<EOL><INDENT>if len(self.headers) != len(data):<EOL><INDENT>raise ValueError<EOL><DEDENT><DEDENT>offset = <NUM_LIT:0> if not self.headers else <NUM_LIT:1><EOL>row = list()<EOL>if data:<EOL><INDENT>for i, element in enumerate(data):<EOL><INDENT>contents = '<STR_LIT>' if element is None else str(element)<EOL>entry = ttk.Entry(self)<EOL>entry.insert(<NUM_LIT:0>, contents)<EOL>entry.grid(row=len(self._rows) + offset,<EOL>column=i,<EOL>sticky='<STR_LIT>')<EOL>row.append(entry)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>for i in range(self.num_of_columns):<EOL><INDENT>entry = ttk.Entry(self)<EOL>entry.grid(row=len(self._rows) + offset,<EOL>column=i,<EOL>sticky='<STR_LIT>')<EOL>row.append(entry)<EOL><DEDENT><DEDENT>self._rows.append(row)<EOL>for row in self._rows:<EOL><INDENT>for widget in row:<EOL><INDENT>widget.unbind('<STR_LIT>')<EOL><DEDENT><DEDENT>def add(e):<EOL><INDENT>self.add_row()<EOL><DEDENT>last_entry = self._rows[-<NUM_LIT:1>][-<NUM_LIT:1>]<EOL>last_entry.bind('<STR_LIT>', add)<EOL>e = self._rows[-<NUM_LIT:1>][<NUM_LIT:0>]<EOL>e.focus_set()<EOL>self._redraw()<EOL>
Add a row of data to the current widget, add a <Tab> \
binding to the last element of the last row, and set \
the focus at the beginning of the next row.

:param data: a row of data
:return: None