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

Filtering feature doesn't work on columns made with arithmetic expressions of other columns #258

Open
aedelgado19 opened this issue Sep 11, 2024 · 0 comments

Comments

@aedelgado19
Copy link

When you load in a df to display, then add in a column to that df that is currently displayed via the code, the column cannot be used to filter.

Steps to recreate issue:

  1. Display a dataframe in the pandastable GUI
  2. Create column that uses other columns (I have a function that generates column data based on other column arithmetic and it successfully fills the column with data). The expression I used was (({height_1} / {height_2}) < 0.1) and ({name} == "Bob") which fills a new column "to_be_checked" with true or false values successfully for each row.
  3. The new column appears in the manual filter dropdown, but if you use it in a filter (ex: filter for only "True"), pandastable code raises a KeyError since it cannot find the location with .get_loc(key)

shared images of error traceback -- the error is within pandastable code.
pandastableissue1
pandastableissue2

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

No branches or pull requests

1 participant