Dec-12-2022, 02:39 PM
Hi All,
hope you are all well!
Need a little nugde...
I have a CSV, within which a couple of lines look like this...
CompanyName LTD, "[email protected],[email protected]", "12234,56678"
How would I select, the second email, from the second column? Or print each of the numbers in the 3rd column individually?
I assume CSV is the correct module for doing this?
Any help would be appreciated!
hope you are all well!
Need a little nugde...
I have a CSV, within which a couple of lines look like this...
CompanyName LTD, "[email protected],[email protected]", "12234,56678"
How would I select, the second email, from the second column? Or print each of the numbers in the 3rd column individually?
import csv dataSetFile = "DemoDataSetForReports.csv" with open(dataSetFile, 'r') as dataSet: csvReader = csv.reader(dataSet) for row in csvReader: print(row[2])The above code prints : 12234,56678
I assume CSV is the correct module for doing this?
Any help would be appreciated!