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

DataFrame.query() resets the column names. #302

Closed
sanchaz opened this issue Oct 24, 2021 · 1 comment
Closed

DataFrame.query() resets the column names. #302

sanchaz opened this issue Oct 24, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sanchaz
Copy link

sanchaz commented Oct 24, 2021

Describe the bug
DataFrame.query() by string resets the columns to 0, 1, 2, ...
https://danfo.jsdata.org/api-reference/dataframe/danfo.dataframe.query#query-by-a-string-column-in-a-dataframe
According to the docs the columns should remain there.

To Reproduce
https://danfo.jsdata.org/api-reference/dataframe/danfo.dataframe.query#query-by-a-string-column-in-a-dataframe
Copy the example posted and run it.

However if you use inplace: true then the behaviour is correct.
Seems the issue is that when returning a new df it forgets to copy the columns.

Expected behavior
Column names should remain the same.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04
  • Browser Firefox
  • Version 93.0 (64-bit)

Additional context
Add any other context about the problem here.

@risenW risenW self-assigned this Dec 5, 2021
@risenW risenW added the bug Something isn't working label Dec 5, 2021
@risenW
Copy link
Member

risenW commented Dec 5, 2021

FIXED!

@risenW risenW closed this as completed Dec 5, 2021
@risenW risenW mentioned this issue Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants