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

Check for proper reset_index #134

Open
1 of 4 tasks
sbrugman opened this issue Aug 30, 2023 · 0 comments
Open
1 of 4 tasks

Check for proper reset_index #134

sbrugman opened this issue Aug 30, 2023 · 0 comments
Labels
new check New check for the linter

Comments

@sbrugman
Copy link

Try to respond to as many of the following as possible

Generally describe the pandas behavior that the linter should check for and why that is a problem. Links to resources, recommendations, docs appreciated

Users may not know how to properly reset the index, and come up with home-brew solutions. Not that frequent, but encountered it in an internal code base.

Suggest specific syntax or pattern(s) that should trigger the linter (e.g., .iat)

df.index = np.arange(0, len(df))

Suggest specific syntax or pattern(s) that the linter should allow (e.g., .iloc)

df = df.reset_index(drop=True)

Suggest a specific error message that the linter should display (e.g., "Use '.iloc' instead of '.iat'. If speed is important, use numpy indexing")

Are you willing to try to implement this check?

  • Yes
  • No
  • Maybe, with some guidance
  • Maybe, but not at this moment
@sbrugman sbrugman added the new check New check for the linter label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new check New check for the linter
Projects
None yet
Development

No branches or pull requests

1 participant