-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Various docstring fixes #28744
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
Various docstring fixes #28744
Changes from 1 commit
a3e4315
d1f1ba0
7fc0e35
cd15cec
51bdc5d
ffe849f
f3b9540
d5c0394
bedf748
4d7a386
2658caf
532b53c
2f48f5a
2df56a2
ded2c0c
5263577
3b6f88c
894f7d1
d687909
ec3b412
494b997
2c723a7
0507336
f631cb4
16fd88a
a5cbc8c
2a105c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Fixed the docstring for transpose, eval, swaplevel, and melt in frame.py
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2603,10 +2603,10 @@ def transpose(self, *args, **kwargs): | |
|
||
Parameters | ||
---------- | ||
copy : bool, default False | ||
If True, the underlying data is copied. Otherwise (default), no | ||
copy is made if possible. | ||
*args, **kwargs | ||
*args | ||
Additional arguments have no effect but might be accepted for | ||
compatibility with numpy. | ||
**kwargs | ||
Additional keywords have no effect but might be accepted for | ||
compatibility with numpy. | ||
|
||
|
@@ -3230,7 +3230,7 @@ def eval(self, expr, inplace=False, **kwargs): | |
If the expression contains an assignment, whether to perform the | ||
operation inplace and mutate the existing DataFrame. Otherwise, | ||
a new DataFrame is returned. | ||
kwargs : dict | ||
**kwargs : dict | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove the type |
||
See the documentation for :func:`eval` for complete details | ||
on the keyword arguments accepted by | ||
:meth:`~pandas.DataFrame.query`. | ||
|
@@ -5198,8 +5198,10 @@ def swaplevel(self, i=-2, j=-1, axis=0): | |
|
||
Parameters | ||
---------- | ||
i, j : int, str (can be mixed) | ||
datapythonista marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Level of index to be swapped. Can pass level name as string. | ||
i : int, str (can be mixed) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
Level of first index to be swapped. Can pass level name as string. | ||
j : int, str (can be mixed) | ||
Level of second index to be swapped. Can pass level name as string. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd merge those, I think the validation script should accept this, as proposed in the PR where you update it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now the proposed script does not validate any variables on the same line, just *args and **kwargs. I left it that way in case we decide we don't want people to just throw a bunch of variables on the same line. If you think that'd be fine, then I can rewrite the script update to allow for that, and change these here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the PR allowing having those together was merged, right? Can you have |
||
|
||
Returns | ||
------- | ||
|
@@ -6295,7 +6297,6 @@ def unstack(self, level=-1, fill_value=None): | |
%(versionadded)s | ||
Parameters | ||
---------- | ||
frame : DataFrame | ||
id_vars : tuple, list, or ndarray, optional | ||
Column(s) to use as identifier variables. | ||
value_vars : tuple, list, or ndarray, optional | ||
|
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.
The script is wrong in this case, please revert