Skip to content

Commit f527348

Browse files
committed
Fix failing CI builds for Docstring
1 parent 2c084dc commit f527348

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

pandas/core/accessor.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -262,13 +262,19 @@ def _register_accessor(name: str, cls):
262262
The requirements for the accessor class are as follows:
263263
264264
* Must contain an init method that:
265-
* accepts a single {klass} object
266-
* raises an {AttributeError} if the {klass} object does not have correctly
265+
266+
* accepts a single {klass} object
267+
268+
* raises an AttributeError if the {klass} object does not have correctly
267269
matching inputs for the accessor
270+
268271
* Must contain a method for each access pattern.
269-
* The methods should be able to take any argument signature.
270-
* Accessible using the @property decorator if no additional arguments are
272+
273+
* The methods should be able to take any argument signature.
274+
275+
* Accessible using the @property decorator if no additional arguments are
271276
needed.
277+
272278
"""
273279

274280
def decorator(accessor):
@@ -309,7 +315,9 @@ def sum(self):
309315
310316
311317
Back in an interactive IPython session:
318+
312319
.. code-block:: ipython
320+
313321
>>> df = pd.DataFrame([[1, 2], ['x', 'y']])
314322
>>> df.int_accessor
315323
Traceback (most recent call last):
@@ -353,7 +361,9 @@ def sum(self):
353361
354362
355363
Back in an interactive IPython session:
364+
356365
.. code-block:: ipython
366+
357367
>>> df = pd.Series([1, 2, 'x'])
358368
>>> df.int_accessor
359369
Traceback (most recent call last):
@@ -394,7 +404,9 @@ def even(self):
394404
return [x for x in self._obj if x % 2 == 0]
395405
396406
Back in an interactive IPython session:
407+
397408
.. code-block:: ipython
409+
398410
>>> df = pd.DataFrame.from_dict({
399411
'row1': {'1':1, '2':'a'},
400412
'row2': {'1':2, '2':'b'}

0 commit comments

Comments
 (0)