javascriptdata / danfojs

Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
https://danfo.jsdata.org/
MIT License
4.8k stars 209 forks source link

Error dfd.merge #49

Closed danielgis closed 4 years ago

danielgis commented 4 years ago

Hello I have 2 DataFrames that I try to join using a common column, but I receive the following

let df_merge = dfd.merge({ left: df_surveys, right: df_stacked_row, on: ["survey"], how: "left" });
df_merge.print();

>>> Uncaught TypeError: n.filter is not a function

// df_surveys
╔═══╤═══════════════════╗
║   │ survey            ║
╟───┼───────────────────╢
║ 0 │ Padron Nominal    ║
╟───┼───────────────────╢
║ 1 │ Limpieza y de...  ║
╟───┼───────────────────╢
║ 2 │ Indicadores d...  ║
╟───┼───────────────────╢
║ 3 │ Visita domici...  ║
╟───┼───────────────────╢
║ 4 │ Georref. de c...  ║
╚═══╧═══════════════════╝

// df_stacked_row
╔════╤═══════════════════╤═══════════════════╤═══════════════════╗
║    │ survey            │ calc_depa         │ cod_eval_coun...  ║
╟────┼───────────────────┼───────────────────┼───────────────────╢
║ 2  │ Padron Nominal    │ 8                 │ 1682              ║
╟────┼───────────────────┼───────────────────┼───────────────────╢
║ 5  │ Limpieza y de...  │ 8                 │ 160               ║
╟────┼───────────────────┼───────────────────┼───────────────────╢
║ 8  │ Indicadores d...  │ 8                 │ 78                ║
╟────┼───────────────────┼───────────────────┼───────────────────╢
║ 14 │ Georref. de c...  │ 8                 │ 235               ║
╚════╧═══════════════════╧═══════════════════╧═══════════════════╝

excuse my English.

steveoni commented 4 years ago

can you share the full code, so I can reproduce the error