Spaces:
Sleeping
Sleeping
File size: 354 Bytes
3b86501 |
1 2 3 4 5 6 7 8 |
def load_csv_to_dict(filename):
"""Loads a CSV file into a list of dictionaries."""
with open(filename, mode='r', newline='', encoding='utf-8') as file:
# Create a DictReader object
dict_reader = csv.DictReader(file)
# Convert DictReader to a list of dictionaries
data_list = list(dict_reader)
return data_list |