-1

I am uploading csv files to https://geocoding.geo.census.gov/ for batch geocoding. After some python code to parse and separate files. I have to manually save each CSV file with excel as a csv again or I get an error "Malformed input file or file not of type .CSV, .TXT, .DAT, .XLS, or .XLSX

The data should be in separate columns in a CSV or Excel file. Use a comma separator for text or DAT files" . I opened with a text editor and notice one difference the comma at the end of each line. Is this an encoding issue? example Working

5028156,2700 W BETHANY HOME RD,Phoenix,AZ,

Non-working file

5093590,4808 N 15TH ST,Phoenix,AZ
Stop harming Monica
  • 12,141
  • 1
  • 36
  • 56

1 Answers1

0

As you can see there are 5 columns defined in the csv example line here. 5028156,2700 W BETHANY HOME RD,Phoenix,AZ,. The trailing comma means the last column of the CSV is null/blank.

In case of CSV files 1,,,, translates to 5 columns where all the value in the columns are empty but first.

Removing the trailing comma will consider that row as having only 4 columns.

I hope that answers your question.

yogkm
  • 649
  • 5
  • 15