Open
Description
let data = { "Name": ["Apples", "Mango", "Banana", "Pear"],
"Count": [21, 5, 30, 10],
"Price": [200, 300, 40, 250] }
let df = new dfd.DataFrame(data, {index: ["a", "b", "c", "d"]})
df.print()
let sub_df = df.loc({rows: ["a"]})
sub_df.print()
In browser, this will cause error:
Uncaught Error: IndexError: Specified index (a) not found
at t._loc (startup:4:47)
at t.loc (startup:4:47)
at pen.js?key=pen.js-8a2f7821-cb23-e0d2-07e7-2b53e94c09e0:7:17
This will only happen when the rows have exactly one element, if it's let sub_df = df.loc({rows: ["a", "b"]}), then it is normal.