-
Hi, I am struggling to figure out why I can't filter by a column with arquero. Using it with node v16.16.0 I have used const dt = await aq.loadCSV("sample.csv"); If I inspect [ 'City', 'Name', 'Year', 'AvgAge' ] Then I try to filter the data table using the following: dt.filter((d) => aq.op.includes(d.City, "bar")) This throws an error for me saying "Unrecognized column: City". I cannot figure out what is wrong here. As seen with the columnNames() function, "City" is a column in my table. Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
If you can link to a sample.csv file that reproduces the issue (or, an Observable notebook showing the failure), I can take a closer look. Meanwhile, you might check to ensure that (a) the other column names are working, and if so, (b) confirm that the string 'City' (as typed into your filter function) exactly matches the actual column name string (does |
Beta Was this translation helpful? Give feedback.
If you can link to a sample.csv file that reproduces the issue (or, an Observable notebook showing the failure), I can take a closer look.
Meanwhile, you might check to ensure that (a) the other column names are working, and if so, (b) confirm that the string 'City' (as typed into your filter function) exactly matches the actual column name string (does
dt.columnNames()[0] === 'City'
?). If there are "invisible" characters (like a byte order mark) at the beginning of your CSV file, it could cause the issue.