Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird slicing behaviour #203

callmekatootie opened this issue May 22, 2021 · 2 comments · Fixed by #209

Weird slicing behaviour #203

callmekatootie opened this issue May 22, 2021 · 2 comments · Fixed by #209


Copy link

Describe the bug

The output after slicing does not match the expectation

To Reproduce
Steps to reproduce the behavior:

const dfd = require('danfojs-node')

let data = { "Name": ["Apples", "Mango", "Banana", "Pear"] ,
           "Count": [21, 5, 30, 10] ,
           "Price": [200, 300, 40, 250] }

let df = new dfd.DataFrame(data)

let sub_df = df.iloc({rows: ["2:3"], columns: ["0:1"]})

The above code gives me the output:


Expected behavior

The output that I get has all the columns. Expected was only the Name column to be shown since I have sliced with "0:1" for columns

Desktop (please complete the following information):

Ubuntu 20.04

Copy link

@callmekatootie I will look into it. thanks

risenW added a commit that referenced this issue May 30, 2021
Fixes #203 bug in column slicing index generation
Copy link

risenW commented May 30, 2021

FIXED: #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging a pull request may close this issue.

3 participants