[data-platform] filter tool adds unexpected __index_level_0__ column #204
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User-Reported Issue
Reported: 2026-01-26T17:20:00-05:00
Reporter: Claude Code via /debug-report (user feedback)
Context
data-platformfilterpersonal-projects/personal-portfolio/home/lmiranda/Repositories/personal/personal-portfoliodevelopmentProblem Description
Goal
Filter DataFrame rows by condition and get a result with the same schema as the source DataFrame.
What Happened
Problem Type: Unexpected behavior
When using the
filtertool on a DataFrame, the resulting DataFrame includes an extra column__index_level_0__that was not present in the original data.Example:
Original DataFrame (sales): 4 columns - date, product, quantity, price
After filter(sales, 'quantity > 5'): 5 columns - date, product, quantity, price, index_level_0
Expected Behavior
The filtered DataFrame should have the same columns as the source DataFrame (4 columns, not 5). The pandas index should either be reset or not exposed as a column in the stored result.
Workaround
None identified. Users could potentially use
selectafterfilterto drop the unwanted column, but this is not intuitive.Investigation Hints
Relevant files to check:
Suggested Fix
In the filter tool implementation, after applying the pandas query, reset the index with
.reset_index(drop=True)before storing the filtered result.Generated by /debug-report (user feedback) - Labels: Type/Bug, Component/API