Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

csv to python dictionary

 pythonCopyimport pandas as pd

dict_from_csv = pd.read_csv('csv_file.csv', header=None, index_col=0, squeeze=True).to_dict()
print(dict_from_csv)
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #csv #python #dictionary
ADD COMMENT
Topic
Name
5+9 =