You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Create a function that extracts text from a csv file. Include any libraries that may be needed. The function should output a python dictionary with the key being the column name and value being the text from the cell.
import csv # import csv library
def extract_text_from_csv(csv_file):
"""
Extract text from a csv file and return a dictionary with the key being the column name and value being the text from the cell.
"""
with open(csv_file, newline='') as csvfile: # open csv file