Building the database using sql file

This commit is contained in:
2025-04-02 15:11:46 -04:00
parent fa870f3f54
commit c78aa38db9
8 changed files with 642 additions and 34 deletions

View File

@@ -7,22 +7,7 @@ def parse_csv(file_path):
# Open and read the CSV file
with open(file_path, 'r') as csvfile:
# Read each row using csv.reader
reader = csv.reader(ciphertextcsvfile)
reader = csv.DictReader(ciphertextcsvfile)
list_of_dict = list(reader)
# Initialize an empty list to store the result
result = []
# Iterate over each row in the CSV
for row in reader:
# Create a dictionary for the current row
person_dict = {
'name': row[0],
'address': row[1],
'number_of_kids': int(row[2]),
'night_or_day': row[3]
}
# Append the dictionary to the result list
result.append(person_dict)
return result
return list_of_dict