Adjust numbering in CSV file

Hi all,
I have a csv file where I need to modify/delete some lines according to my filters then write it again to CSV. Problem is, I need to adjust the numbering in the first column below the deleted line.
What would be the most efficient way to this? Thanks
P.S.: I have cropped out some texts at the top, so when I read this csv file, output datatable has only one column.


On what basis do you want to delete a row like is there any specific condition?

@monsieurrahul Sorry I hid the column where I apply my filters. My filter is like SampleDT.AsEnumerable.Where(function(x) Not x(5).ToString.Contains(“Failed”)).CopyToDataTable
I’m finding a way how can I adjust the numbering(see pic above) if I delete a row in the datatable.
Appreciate your help. Thanks!

After deletion, you can reassign values based on the DT rows count using a while loop.