sudoedit,

Ok guru's.

I'm working on a very simple csv reader and I can't get the value from the first column.

I've got a csv file like this:
Last Name,First Name
Smith,Joe

and then a short python script like this:
import csv

with open("test.csv",'r', encoding='utf-8-sig') as f:
reader = csv.DictReader(f)
for row in reader:
print(row['First Name'], row['Last name'])
print(row)

if I remove row['Last Name'] from the print statement I get the first names.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • ethstaker
  • JUstTest
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines