-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Replacing some of @Appender in pandas/pandas/core/frame.py. #63384
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
base: main
Are you sure you want to change the base?
Conversation
ender in pandas/pandas/core/frame.py.
| cost revenue | ||
| Q1 A 250 100 | ||
| B 150 250 | ||
| C 100 300 | ||
| Q2 A 150 200 | ||
| B 300 175 | ||
| C 220 225 | ||
|
|
||
| >>> df.le(df_multindex, level=1) | ||
| cost revenue | ||
| Q1 A True True | ||
| B True True | ||
| C True True | ||
| Q2 A False True | ||
| B True False | ||
| C True False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you re-align these tables?
| cost revenue | ||
| Q1 A True True | ||
| B True True | ||
| C True True | ||
| Q2 A False True | ||
| B True False | ||
| C True False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
| Examples | ||
| -------- | ||
| >>> df = pd.DataFrame({"A": [1, 2, 3], "B": [4, 5, 6]}) | ||
|
|
||
| Change the row labels. | ||
|
|
||
| >>> df.set_axis(["a", "b", "c"], axis="index") | ||
| A B | ||
| a 1 4 | ||
| b 2 5 | ||
| c 3 6 | ||
|
|
||
| Change the column labels. | ||
|
|
||
| >>> df.set_axis(["I", "II"], axis="columns") | ||
| I II | ||
| 0 1 4 | ||
| 1 2 5 | ||
| 2 3 6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you fix the indentation?
Replacing some of @appender in pandas/pandas/core/frame.py.
ref #62437