Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
not printing soup data to csv
#3
Hi apologies, just saw this reply - it prints table data to console & have been copying and pasting from there since. Ideally the CSV bit would work


(Sep-17-2020, 12:07 PM)Aspire2Inspire Wrote: Hey dude.

So using the same settings in regards to .csv i created something simple to check that there wasn't an issue there which there of course should not have been..

import csv

tr = ["434", "3434", "23", "4523423", "423", "654", "234", "34", "54", "65", "234", "654", "5647", "345", "234"]

csvFile = open("booking_data.csv", 'wt', newline='', encoding='utf-8')
writer = csv.writer(csvFile)
for cell in tr:
    writer.writerow(cell)
    print(cell)
csvFile.close()
Everything worked fine.

Are you getting the table data printing to console?
Reply


Messages In This Thread
not printing soup data to csv - by rickyrt - Sep-17-2020, 02:52 AM
RE: not printing soup data to csv - by rickyrt - Aug-31-2021, 03:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Soup('A') new_coder_231013 6 2,610 Aug-12-2023, 10:55 AM
Last Post: Pubfonts
  how to store data from the soup in the loop? zarize 1 1,684 Mar-02-2020, 04:17 PM
Last Post: Larz60+
  strange characters after printing soup zarize 4 2,456 Jan-28-2020, 08:57 AM
Last Post: zarize

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020