I imported a csv into python3 as a List object. Assuming that the headers of the original csv were "FirstName", "LastName", "EmailAddress", "MailAddress", "PhoneNumber", how would I list only the rows that have no string in the "EmailAddress" column? Or how would I list only the rows that have no entry under the "PhoneNumber" column. Im not sure how to refer to specific rows in the List.
If the name of the List was called "ContactInfo", is there a way to specify just the PhoneNumber column? In powershell it would look like....
A good way to figure this out would just be to print the list that you have.
Typically, csv to list returns a list of lists, where each inner element list is one row. You can refer individual elements of this inner list element (specific columns) using indices
So you can do :
For row in list_from_csv : If row = ...... (condition) If row = ...... (condition)
Here we are checking the 3rd and 5th column in each row.