Re: Writing output of function to a csv file

2020-05-25 Thread Ciarán Hudson
Thanks, between this message and the one below I was able to understand my error and fix it. I really appreciate the help. -- https://mail.python.org/mailman/listinfo/python-list

Writing output of function to a csv file

2020-05-25 Thread Ciarán Hudson
Hi, In the code below, which is an exercise I'm doing in class inheritance, almost everything is working except outputting my results, which as the function stock_count, to a csv. stock_count is working in the code. And I'm able to open and close the csv called cars, but the stock_count output

Re: creating a csv from information I have printed to screen

2020-05-22 Thread Ciarán Hudson
This has helped a lot; cleaner output, keeping tbl format and creating a csv but the csv is not being populated. Any idea what I am doing wrong? import requests import csv, sys from bs4 import BeautifulSoup cookies = { 'ApplicationGatewayAffinity': '1d2ad8ab214d1293a4e31bcd161589fa82a54a

creating a csv from information I have printed to screen

2020-05-21 Thread Ciarán Hudson
How do I edit the code below to create a csv file which includes the information I have printed at the bottom? I'm pulling arrival data from an airport website and printing out only the flight info. I want to save that flight info to a CSV file. import requests from bs4 import BeautifulSoup c