def add_row(self, data: list):
<EOL>if self.headers:<EOL><INDENT>if len(self.headers) != len(data):<EOL><INDENT>raise ValueError<EOL><DEDENT><DEDENT>if len(data) != self.num_of_columns:<EOL><INDENT>raise ValueError<EOL><DEDENT>offset = <NUM_LIT:0> if not self.headers else <NUM_LIT:1><EOL>row = list()<EOL>for i, element in enumerate(data):<EOL><INDENT>label = ttk.Label(self, text=str(element), relief=tk.GROOVE,<EOL>padding=self.padding)<EOL>label.grid(row=len(self._rows) + offset, column=i, sticky='<STR_LIT>')<EOL>row.append(label)<EOL><DEDENT>self._rows.append(row)<EOL>
Add a row of data to the current widget

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