I am just a week old to python so please don't mind my ignorance, I am reading a csv file and creating a json file from it, while doing that I am adding a new field 
**JerseyNumber** to my field\_names, since this value is not present in csv it's getting stored as null, is there any way I can fill this field, so my course of action was have a list of numbers such as -

```
JERSEYNUMBERS = ["1","2","3","4","5","6","7"] 

```

and 
 add random values from it, by using -

```
"".join(random.sample(JERSEYNUMBERS,2))

```

but I am not able to find way to get it in with my json, because using `restval="".join(random.sample(JERSEYNUMBERS,2)` dosn't give random values and updates same value to all the Jersey Numbers.

my function for csv to json -

```
def csv_to_json (csv_file_name_str, json_file_name_str):
    try:
        logging.info("converting {} to {}".format(csv_file_name_str, json_file_name_str))
        csv_file = open(csv_file_name_str, "r")
        json_file = open(json_file_name_str, "w")

        field_names = ["Name", "Height", "SoccerExperience", "GuardianName", "JerseyNumber"]
        reader = csv.DictReader(csv_file, field_names, restval="".join(random.sample(JERSEYNUMBERS,2)))
        logging.info("Conversion finish.")
        out = '{\n "Players": [\n\t'+ ',\n\t'.join([json.dumps(row) for row in reader]) + '\n]\n}'
        json_file.write(out)
        return json_file_name_str
    except (OSError, IOError, TypeError) as e:
        logging.error("csv to json conversion failed: Caused by -> {}".format(e))

```

my json file with null values in JerseyNumbers *(This is my test data not real people)*-

```
{
 "Players": [
    {"Name": "Name", "Height": "Height (inches)", "SoccerExperience": "Soccer Experience", "GuardianName": "Guardian Name(s)", "JerseyNumber": null},
    {"Name": "Joe Smith", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Jim and Jan Smith", "JerseyNumber": null},
    {"Name": "Jill Tanner", "Height": "36", "SoccerExperience": "YES", "GuardianName": "Clara Tanner", "JerseyNumber": null},
    {"Name": "Bill Bon", "Height": "43", "SoccerExperience": "YES", "GuardianName": "Sara and Jenny Bon", "JerseyNumber": null},
    {"Name": "Eva Gordon", "Height": "45", "SoccerExperience": "NO", "GuardianName": "Wendy and Mike Gordon", "JerseyNumber": null},
    {"Name": "Matt Gill", "Height": "40", "SoccerExperience": "NO", "GuardianName": "Charles and Sylvia Gill", "JerseyNumber": null},
    {"Name": "Kimmy Stein", "Height": "41", "SoccerExperience": "NO", "GuardianName": "Bill and Hillary Stein", "JerseyNumber": null},
    {"Name": "Sammy Adams", "Height": "45", "SoccerExperience": "NO", "GuardianName": "Jeff Adams", "JerseyNumber": null},
    {"Name": "Karl Saygan", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Heather Bledsoe", "JerseyNumber": null},
    {"Name": "Suzane Greenberg", "Height": "44", "SoccerExperience": "YES", "GuardianName": "Henrietta Dumas", "JerseyNumber": null},
    {"Name": "Sal Dali", "Height": "41", "SoccerExperience": "NO", "GuardianName": "Gala Dali", "JerseyNumber": null},
    {"Name": "Joe Kavalier", "Height": "39", "SoccerExperience": "NO", "GuardianName": "Sam and Elaine Kavalier", "JerseyNumber": null},
    {"Name": "Ben Finkelstein", "Height": "44", "SoccerExperience": "NO", "GuardianName": "Aaron and Jill Finkelstein", "JerseyNumber": null},
    {"Name": "Diego Soto", "Height": "41", "SoccerExperience": "YES", "GuardianName": "Robin and Sarika Soto", "JerseyNumber": null},
    {"Name": "Chloe Alaska", "Height": "47", "SoccerExperience": "NO", "GuardianName": "David and Jamie Alaska", "JerseyNumber": null},
    {"Name": "Arnold Willis", "Height": "43", "SoccerExperience": "NO", "GuardianName": "Claire Willis", "JerseyNumber": null},
    {"Name": "Phillip Helm", "Height": "44", "SoccerExperience": "YES", "GuardianName": "Thomas Helm and Eva Jones", "JerseyNumber": null},
    {"Name": "Les Clay", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Wynonna Brown", "JerseyNumber": null},
    {"Name": "Herschel Krustofski", "Height": "45", "SoccerExperience": "YES", "GuardianName": "Hyman and Rachel Krustofski", "JerseyNumber": null}
]
}

```

with `restval` -

```
{
 "Players": [
    {"Name": "Name", "Height": "Height (inches)", "SoccerExperience": "Soccer Experience", "GuardianName": "Guardian Name(s)", "JerseyNumber": "13"},
    {"Name": "Joe Smith", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Jim and Jan Smith", "JerseyNumber": "13"},
    {"Name": "Jill Tanner", "Height": "36", "SoccerExperience": "YES", "GuardianName": "Clara Tanner", "JerseyNumber": "13"},
    {"Name": "Bill Bon", "Height": "43", "SoccerExperience": "YES", "GuardianName": "Sara and Jenny Bon", "JerseyNumber": "13"},
    {"Name": "Eva Gordon", "Height": "45", "SoccerExperience": "NO", "GuardianName": "Wendy and Mike Gordon", "JerseyNumber": "13"},
    {"Name": "Matt Gill", "Height": "40", "SoccerExperience": "NO", "GuardianName": "Charles and Sylvia Gill", "JerseyNumber": "13"},
    {"Name": "Kimmy Stein", "Height": "41", "SoccerExperience": "NO", "GuardianName": "Bill and Hillary Stein", "JerseyNumber": "13"},
    {"Name": "Sammy Adams", "Height": "45", "SoccerExperience": "NO", "GuardianName": "Jeff Adams", "JerseyNumber": "13"},
    {"Name": "Karl Saygan", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Heather Bledsoe", "JerseyNumber": "13"},
    {"Name": "Suzane Greenberg", "Height": "44", "SoccerExperience": "YES", "GuardianName": "Henrietta Dumas", "JerseyNumber": "13"},
    {"Name": "Sal Dali", "Height": "41", "SoccerExperience": "NO", "GuardianName": "Gala Dali", "JerseyNumber": "13"},
    {"Name": "Joe Kavalier", "Height": "39", "SoccerExperience": "NO", "GuardianName": "Sam and Elaine Kavalier", "JerseyNumber": "13"},
    {"Name": "Ben Finkelstein", "Height": "44", "SoccerExperience": "NO", "GuardianName": "Aaron and Jill Finkelstein", "JerseyNumber": "13"},
    {"Name": "Diego Soto", "Height": "41", "SoccerExperience": "YES", "GuardianName": "Robin and Sarika Soto", "JerseyNumber": "13"},
    {"Name": "Chloe Alaska", "Height": "47", "SoccerExperience": "NO", "GuardianName": "David and Jamie Alaska", "JerseyNumber": "13"},
    {"Name": "Arnold Willis", "Height": "43", "SoccerExperience": "NO", "GuardianName": "Claire Willis", "JerseyNumber": "13"},
    {"Name": "Phillip Helm", "Height": "44", "SoccerExperience": "YES", "GuardianName": "Thomas Helm and Eva Jones", "JerseyNumber": "13"},
    {"Name": "Les Clay", "Height": "42", "SoccerExperience": "YES", "GuardianName": "Wynonna Brown", "JerseyNumber": "13"},
    {"Name": "Herschel Krustofski", "Height": "45", "SoccerExperience": "YES", "GuardianName": "Hyman and Rachel Krustofski", "JerseyNumber": "13"}
]
}

```