It would be easier to help if you showed us more of your script (please use the code /code markers so we can see the indents). But in the meantime, you should know that the .getDataAt() method is part of the platform dataset object, not the table component itself. You can get a platform dataset from a pydataset by running the pydataset through the system.dataset.toDataSet() function, or by accessing the undocumented .underlyingDataset property. No need to put the dataset in a table. The platform dataset object has a rowCount property you can use.