-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
autofixes for PD003, PD004, PD008, PD009 and PD011
- Loading branch information
Showing
11 changed files
with
221 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import pandas as pd | ||
|
||
df = pd.DataFrame() | ||
|
||
df.isnull() | ||
df.isna() | ||
df.notnull() | ||
df.notna() | ||
df.at[1] | ||
df.loc[1] | ||
df.iat[1] | ||
df.iloc[1] | ||
df.values | ||
df.to_numpy() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...s/ruff/src/rules/pandas_vet/snapshots/ruff__rules__pandas_vet__tests__PD003_fixes.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff/src/rules/pandas_vet/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UseOfDotIsNull: ~ | ||
location: | ||
row: 5 | ||
column: 0 | ||
end_location: | ||
row: 5 | ||
column: 9 | ||
fix: | ||
content: | ||
- df.isna | ||
location: | ||
row: 5 | ||
column: 0 | ||
end_location: | ||
row: 5 | ||
column: 9 | ||
parent: ~ | ||
|
23 changes: 23 additions & 0 deletions
23
...s/ruff/src/rules/pandas_vet/snapshots/ruff__rules__pandas_vet__tests__PD004_fixes.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff/src/rules/pandas_vet/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UseOfDotNotNull: ~ | ||
location: | ||
row: 7 | ||
column: 0 | ||
end_location: | ||
row: 7 | ||
column: 10 | ||
fix: | ||
content: | ||
- df.notna | ||
location: | ||
row: 7 | ||
column: 0 | ||
end_location: | ||
row: 7 | ||
column: 10 | ||
parent: ~ | ||
|
23 changes: 23 additions & 0 deletions
23
...s/ruff/src/rules/pandas_vet/snapshots/ruff__rules__pandas_vet__tests__PD008_fixes.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff/src/rules/pandas_vet/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UseOfDotAt: ~ | ||
location: | ||
row: 9 | ||
column: 0 | ||
end_location: | ||
row: 9 | ||
column: 5 | ||
fix: | ||
content: | ||
- df.loc | ||
location: | ||
row: 9 | ||
column: 0 | ||
end_location: | ||
row: 9 | ||
column: 5 | ||
parent: ~ | ||
|
23 changes: 23 additions & 0 deletions
23
...s/ruff/src/rules/pandas_vet/snapshots/ruff__rules__pandas_vet__tests__PD009_fixes.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff/src/rules/pandas_vet/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UseOfDotIat: ~ | ||
location: | ||
row: 11 | ||
column: 0 | ||
end_location: | ||
row: 11 | ||
column: 6 | ||
fix: | ||
content: | ||
- df.iloc | ||
location: | ||
row: 11 | ||
column: 0 | ||
end_location: | ||
row: 11 | ||
column: 6 | ||
parent: ~ | ||
|
23 changes: 23 additions & 0 deletions
23
...s/ruff/src/rules/pandas_vet/snapshots/ruff__rules__pandas_vet__tests__PD011_fixes.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
source: crates/ruff/src/rules/pandas_vet/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
UseOfDotValues: ~ | ||
location: | ||
row: 13 | ||
column: 0 | ||
end_location: | ||
row: 13 | ||
column: 9 | ||
fix: | ||
content: | ||
- df.to_numpy() | ||
location: | ||
row: 13 | ||
column: 0 | ||
end_location: | ||
row: 13 | ||
column: 9 | ||
parent: ~ | ||
|