title: Delete all rows on spotfire Data Table Iron python
body: <p>I was looking for a way to delete rows in my Data table on <strong>SPOTFIRE</strong> and I didn't find a proper way to do it.</p>
  
  <p>I tried to code a script to do it, but It's too slow and I have more the 20k rows to be deleted.</p>
  
  <p>Does someone have an idea why it's too slow and if there is a another way to do (a faster way)</p>
  
  <pre><code>from Spotfire.Dxp.Data import RowSelection
  table=Document.Data.Tables["my Table name"]
  i=0
  for row in table.GetRows():
    i+=1
    rowToDelete=Document.Data.Tables["my Table name"].Select("[index]="+`i`).AsIndexSet()
    Document.Data.Tables["my Table name"].RemoveRows(RowSelection(rowToDelete))
  </code></pre>