top of page

Python Script Error - Wrong Number of Columns Error Because of Hash Sign

In this video posted to my YouTube channel, you can see how the hash sign in the second to last column, causes Python to return the error message, "Wrong number of columns at line 2".

Python uses hash signs to identify comments. When the script is modified to include the command comments=None the error will no longer occur.

Also note that unless this change is made, the presence of hash symbols in the last column will prevent Python from collecting the full entry in the last column - it will only return the entry up to and including the hash symbol.

bottom of page