You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to work on the issue #59592, specifically for the remove_categories and rename_categories methods. Before finalizing my changes, I need some clarification on a few points regarding the documentation:
*args and **kwargs Usage:
For remove_categories, the method only seems to use the removals parameter.
Similarly, for rename_categories, *args and **kwargs are mentioned but not utilized in the method implementation. Could you clarify whether the inclusion of *args and **kwargs in the documentation for methods is by design?
I have noticed this pattern across many methods and wanted to confirm if this is intentional or if the documentation should be updated to reflect actual usage.
inplace Parameter: The inplace parameter for methods is included in the error codes of the validation docstring. However, it is not explicitly mentioned in the current documentation, nor is it included as part of the method definition for both methods.
Suggested fix for documentation
Verify usage of **args, **kwargs, and 'inplace' if not make changes to the pandas.Series.cat methods in docs.
The text was updated successfully, but these errors were encountered:
saldanhad
changed the title
DOC: Questions on Usage of *args, **kwargs, and inplace Parameters in pandas.Series.cat methods
DOC: Questions on Usage of *args, **kwargs, and inplace parameters in pandas.Series.cat methods
Sep 12, 2024
Thanks for the report! In the pandas code, the signature of the function is
def remove_categories(self, removals) -> Self:
I believe when we wrap it for adding it to the cat accessor, the signature gets changed to *args, **kwargs as these are passed through by _create_delegator_method:
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/reference/api/pandas.Series.cat.remove_categories.html#pandas.Series.cat.remove_categories
https://pandas.pydata.org/docs/reference/api/pandas.Series.cat.rename_categories.html#pandas.Series.cat.rename_categories
Documentation problem
I am currently trying to work on the issue #59592, specifically for the remove_categories and rename_categories methods. Before finalizing my changes, I need some clarification on a few points regarding the documentation:
*args
and**kwargs
Usage:*args
and**kwargs
are mentioned but not utilized in the method implementation. Could you clarify whether the inclusion of*args
and**kwargs
in the documentation for methods is by design?inplace
Parameter: Theinplace
parameter for methods is included in the error codes of the validation docstring. However, it is not explicitly mentioned in the current documentation, nor is it included as part of the method definition for both methods.Suggested fix for documentation
Verify usage of
**args
,**kwargs
, and 'inplace' if not make changes to thepandas.Series.cat
methods in docs.The text was updated successfully, but these errors were encountered: