Skip to content

Latest commit

 

History

History

save-to-file

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Scraping data and saving to file

This part of the presentation will use what was discussed in the simple directory, and elaborate on saving data to a CSV file.

with open('somefile.csv', 'w') as file:
    writer = csv.DictWriter(file, sorted(my_dictionary[0].keys()))
    writer.writeheader()
    writer.writerows(my_dictionary)