if i > 0:
data.append(dict(
number_of_rooms=int(row[0]),
number_of_bathrooms=int(row[1]),
sqft=int(float(row[2].replace(",", "."))),
location=str(row[3]),
days_on_market=int(row[4]),
After Change
data = []
DS = DATASETS_COLUMN_TYPES[TEST_DATASET]
for i, row in enumerate(csvf):
if i == 0:
continue
data.append({
column[0]: column[1](row[i])
for i, column in enumerate(DS)
})
db[TEST_DATASET].insert_many(data)
print("done")