Closed
Description
Describe the bug
Running the example code below results in wrong column type
To Reproduce
Steps to reproduce the behavior:
- Open the attached test.html in your browser
- or group a string column with numerical values like "2021-01" and count another column
var json_data = [
{ key: "P1", month: "2021-01", storypoints: 3 },
{ key: "P2", month: "2021-02", storypoints: 1 },
{ key: "P3", month: "2021-02", storypoints: 3 },
{ key: "P4", month: "2021-03", storypoints: 2 },
{ key: "P5", month: "2021-04", storypoints: 3 }
];
let df = new dfd.DataFrame(json_data);
df.plot("div1").table()
let grp = df.groupby(["month"]);
let new_df = grp.col(["key"]).count();
new_df.plot("div2").table()
Expected behavior
- column "month" in grouped dataframe should show values like "2021-01", "2021-02", ...
- instead the whole columns datatype is changed from string to int and it shows multiple entries of "2021", "2021"
- the month part after the "-" is cut off
Screenshots
test.zip - zipped test.html
Desktop (please complete the following information):
- OS: Win 10
- Browser chrome
- Version 89.0.4389.128
Metadata
Metadata
Assignees
Labels
No labels