This is my code

```
      import csv
    with open('dane_d.txt') as csv_file:
        csv_reader = csv.reader(csv_file, delimiter=',')
        line_count = 0
        for row in csv_reader:
            if line_count == 0:
                print(f'Column names are {", ".join(row)}')
                line_count += 1
            else:
                print(f'\t{row[0]},{row[1]},{row[2]},{row[3]},{row[4]},{row[5]}{row[6]},{row[7]},{row[8]},{row[9]}.')               
            with open('%s.txt'%row[0], mode='a', newline='') as file:
                writer = csv.writer(file)
                writer.writerow("{0}{1},{2},{3},{4},{5},{6},{7},{8},{9}".format(row[0],row[1],row[2],row[3],row[4],row[5],row[6],row[7],row[8],row[9]))

```

input file

```
WHH,D,20200911,000000,0.384,0.454,0.384,0.43,22,0 

WHH,D,20200911,000000,9.75,9.75,9.75,9.75,52,0

11B,D,20200813,000000,492.5,507,490.5,506,2722,0

```

output

```
W,H,H,D,",",2,0,2,0,0,9,1,1,",",0,0,0,0,0,0,",",0,.,3,8,4,",",0,.,4,5,4,",",0,.,3,8,4,",",0,.,4,3,",",2,2,",",0

W,H,H,D,",",2,0,2,0,0,9,1,1,",",0,0,0,0,0,0,",",9,.,7,5,",",9,.,7,5,",",9,.,7,5,",",9,.,7,5,",",5,2,",",0

```