Python Forum
Hi how to take row 1 for every column and check the value what class is it
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hi how to take row 1 for every column and check the value what class is it
#1
Hi I have homework and i am stuck as to how to take row 1 for every column in the given csv file and check the value inside the cell what class is it? if it is numeric? and to count the total unique value in every column. This is what i have so far. Appreciate your help.

with open(hdbrpi) as csv_file:
    csv_reader = csv.reader(csv_file, delimiter=',')
    line_count = 0
    for row in csv_reader:
        if line_count == 0:
            print(row[line_count], "<class 'str'>" , "isnumeric:", row[line_count].isnumeric())
            line_count += 1
Reply


Messages In This Thread
Hi how to take row 1 for every column and check the value what class is it - by kirito85 - Nov-20-2018, 12:29 PM

Forum Jump:

User Panel Messages

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