-
Notifications
You must be signed in to change notification settings - Fork 18
Check for proper reset_index #134
Copy link
Copy link
Open
Labels
new checkNew check for the linterNew check for the linter
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
new checkNew check for the linterNew check for the linter