I am trying to write a set of data to csv file. The file have headers and the header name auto increments against the number of values in output of a that field. For example if I have a Additional Skills column, and there are 17 skills so the header will be like 

```
Additional Skills 1 + Endorsements .... Additional Skills 17 + Endorsements

```

Now, when I am writing the data against the field, I am able to write it properly if there are exactly 17 fields. But if there is another set of data, which has let's say 10 fields, it does write in 10 fields, now Considering that there are other columns after the "Additional Skills + Endorsements" for example "School" column, instead of writing "school" data in 'school' column the data gets written in "Additional Skills 11 + Endorsements"

My Code for Adding column field is as follows:

```
profile_eksills_len = 0
for profile in link_data:
    new_profile_eksills = len(profile["skillsExtended"])
    if new_profile_eksills > profile_eksills_len:
        profile_eksills_len = new_profile_eksills

for i in range(profile_eksills_len):
    profile_header.append("Additional Skills {} + Endorsements".format(i+1))

```

Code for writing the CSV file is as follows:

```
with open("data.csv", "w") as output:
    writer = csv.writer(output, dialect='excel', delimiter='\t', )
    writer.writerow(profile_header)
    # get   job title
    for profile in link_data:
        exp_data = [profile['name'], profile['info'], profile['currentJob'] ]
        for exp in profile["exp"]:
            if exp['jobDesc']:
                exp_data.append(exp['title'] + ":" + exp['comp'] + ":" + exp['jobDesc'])
            else:
                exp_data.append(exp['title'] + ":" + exp['comp'])
        for exp in profile["extras"]:
            exp_data.append(exp['extras'])
        for edu in profile['edu']:
            exp_data.append(edu['school'])
        for skills in profile["skills"]:
            exp_data.append(skills['sets'] + ":" + skills['endorsementCounts'])
        for skill in profile["skillsExtended"]:
            exp_data.append(skill['extsets'] + ":" + skill['endorsedCount'])

        print(exp_data)
        # write data column wise.... 

        writer.writerow(exp_data)   

```

I would like to know if there is a way to achieve this?