2

I'm trying to join two files using the csvjoin command from csvkit. One csv is much larger than the other, but they both have a column in common, an RD code (with a column name of "RD"). Assuming that it's not a problem for csvjoin to match on just the rows that have the same RD codes, I'm not sure why this command isn't working: csvjoin RD all-crimes-2012.csv some-crimes-2012.csv > joined-2012.csv

I'm getting this error: "coercing to Unicode: need string or buffer, LazyFile found". I thought maybe the encoding was wrong so I saved each csv with UTF-8 encoding and tried the command again -- got the same error. There are a couple other people who've asked the same question in regards to the csvjoin command, but I haven't seen any answer.

I'm on Python 2.7.15 on Sierra.

Any ideas on what the problem might be? Any help is appreciated.

impostorsyndrome
  • 103
  • 1
  • 10
  • 1
    your command seems wrong. If you specify column name, you must use `-c`, than `csvjoin -c RD all-crimes-2012.csv some-crimes-2012.csv > joined-2012.csv` – aborruso Jan 05 '19 at 17:54

0 Answers0