Skip to content

Commit 5f63a8f

Browse files
Remove the @doc decorator from pandas/core/accessor.py
1 parent 299f6be commit 5f63a8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/accessor.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def _register_accessor(
280280
281281
Examples
282282
--------
283-
283+
284284
"""
285285

286286
def decorator(accessor: TypeT) -> TypeT:
@@ -374,7 +374,10 @@ def register_dataframe_accessor(name: str) -> Callable[[TypeT], TypeT]:
374374
>>> @pd.api.extensions.register_dataframe_accessor("int_accessor")
375375
... class IntAccessor:
376376
... def __init__(self, pandas_obj):
377-
... if not all(pandas_obj[col].dtype == 'int64' for col in pandas_obj.columns):
377+
... if not all(
378+
... pandas_obj[col].dtype == 'int64'
379+
... for col in pandas_obj.columns
380+
... ):
378381
... raise AttributeError("All columns must contain integer values only")
379382
... self._obj = pandas_obj
380383
...

0 commit comments

Comments
 (0)