Skip to content

Commit 1eb75d6

Browse files
committed
Replace codeblock with separate paragraphs
1 parent cbb26c8 commit 1eb75d6

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

pandas/core/generic.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2722,16 +2722,16 @@ def interpolate(self, method='linear', axis=0, limit=None, inplace=False,
27222722
27232723
Examples
27242724
--------
2725-
.. code-block:: python
27262725
2727-
# Filling in NaNs:
2728-
>>> s = pd.Series([0, 1, np.nan, 3])
2729-
>>> s.interpolate()
2730-
0 0
2731-
1 1
2732-
2 2
2733-
3 3
2734-
dtype: float64
2726+
Filling in NaNs
2727+
2728+
>>> s = pd.Series([0, 1, np.nan, 3])
2729+
>>> s.interpolate()
2730+
0 0
2731+
1 1
2732+
2 2
2733+
3 3
2734+
dtype: float64
27352735
27362736
"""
27372737
if self.ndim > 2:
@@ -2903,16 +2903,14 @@ def groupby(self, by=None, axis=0, level=None, as_index=True, sort=True,
29032903
29042904
Examples
29052905
--------
2906-
.. code-block:: python
2906+
DataFrame results
29072907
2908-
# DataFrame result
2909-
>>> data.groupby(func, axis=0).mean()
2908+
>>> data.groupby(func, axis=0).mean()
2909+
>>> data.groupby(['col1', 'col2'])['col3'].mean()
29102910
2911-
# DataFrame result
2912-
>>> data.groupby(['col1', 'col2'])['col3'].mean()
2911+
DataFrame with hierarchical index
29132912
2914-
# DataFrame with hierarchical index
2915-
>>> data.groupby(['col1', 'col2']).mean()
2913+
>>> data.groupby(['col1', 'col2']).mean()
29162914
29172915
Returns
29182916
-------

0 commit comments

Comments
 (0)