IndentationError
Cause: did not indent code after a colon
Solution: indent code after colon that should run as the block
SyntaxError
Possible Cause: no colon at the end of statement where one should be
Solution: find and add colon
reader( ) function syntax
file_reader_variable = csv.reader(file_variable/alias given using with or open( ))
next( ) syntax to print header row
# Read file w/ reader function file_reader = csv.reader(file_alias)
#Print header row headers = next(file_reader) # Prints the first row print(headers)
next( ) what it does
Skips first row and returns next item in list