Schedule modification

Hello, I have a dynamo script that combines a few schedules and when the script modifies the schedule it adds a blank row for no reason. All of my data ranges work out with what I should have. Is there a way to hide the last row of a schedule? Or is there an issue that when you modify a schedule it shows the hidden row for calculating grand totals? Thank you.