Delete Row Script/Command?

Is there a script command that will allow me to easily delete the selected row of a table? I just want a button that will delete the selected row of a table and I’m assuming there’s a simple command to do so that I do not know. Any help? Thanks in advance, this forum is super helpful! :thumb_left:

table = event.source.parent.getComponent('Power Table')
row = table.selectedRow
table.data = system.dataset.deleteRow(table.data, row)

PERFECT!!! Thank you so much!! :astonished: :astonished: :astonished: