Skip to content

Commit 6efd5f5

Browse files
More GL07 error fixes
1 parent b78aa8d commit 6efd5f5

File tree

7 files changed

+50
-50
lines changed

7 files changed

+50
-50
lines changed

pandas/_libs/interval.pyx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,16 @@ cdef class Interval(IntervalMixin):
158158
Whether the interval is closed on the left-side, right-side, both or
159159
neither. See the Notes for more detailed explanation.
160160
161+
See Also
162+
--------
163+
IntervalIndex : An Index of Interval objects that are all closed on the
164+
same side.
165+
cut : Convert continuous data into discrete bins (Categorical
166+
of Interval objects).
167+
qcut : Convert continuous data into bins (Categorical of Interval objects)
168+
based on quantiles.
169+
Period : Represents a period of time.
170+
161171
Notes
162172
-----
163173
The parameters `left` and `right` must be from the same type, you must be
@@ -226,16 +236,6 @@ cdef class Interval(IntervalMixin):
226236
>>> volume_1 = pd.Interval('Ant', 'Dog', closed='both')
227237
>>> 'Bee' in volume_1
228238
True
229-
230-
See Also
231-
--------
232-
IntervalIndex : An Index of Interval objects that are all closed on the
233-
same side.
234-
cut : Convert continuous data into discrete bins (Categorical
235-
of Interval objects).
236-
qcut : Convert continuous data into bins (Categorical of Interval objects)
237-
based on quantiles.
238-
Period : Represents a period of time.
239239
"""
240240
_typ = "interval"
241241

@@ -387,6 +387,11 @@ cdef class Interval(IntervalMixin):
387387
bool
388388
``True`` if the two intervals overlap, else ``False``.
389389
390+
See Also
391+
--------
392+
IntervalArray.overlaps : The corresponding method for IntervalArray
393+
IntervalIndex.overlaps : The corresponding method for IntervalIndex
394+
390395
Examples
391396
--------
392397
>>> i1 = pd.Interval(0, 2)
@@ -409,11 +414,6 @@ cdef class Interval(IntervalMixin):
409414
>>> i6 = pd.Interval(1, 2, closed='neither')
410415
>>> i4.overlaps(i6)
411416
False
412-
413-
See Also
414-
--------
415-
IntervalArray.overlaps : The corresponding method for IntervalArray
416-
IntervalIndex.overlaps : The corresponding method for IntervalIndex
417417
"""
418418
if not isinstance(other, Interval):
419419
msg = '`other` must be an Interval, got {other}'

pandas/_libs/tslibs/timedeltas.pyx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,10 @@ cdef class _Timedelta(timedelta):
10591059
-------
10601060
formatted : str
10611061
1062+
See Also
1063+
--------
1064+
Timestamp.isoformat
1065+
10621066
Notes
10631067
-----
10641068
The longest component is days, whose value may be larger than
@@ -1081,10 +1085,6 @@ cdef class _Timedelta(timedelta):
10811085
'P0DT0H0M10S'
10821086
>>> pd.Timedelta(days=500.5).isoformat()
10831087
'P500DT12H0MS'
1084-
1085-
See Also
1086-
--------
1087-
Timestamp.isoformat
10881088
"""
10891089
components = self.components
10901090
seconds = '{}.{:0>3}{:0>3}{:0>3}'.format(components.seconds,
@@ -1210,14 +1210,14 @@ class Timedelta(_Timedelta):
12101210
"""
12111211
Round the Timedelta to the specified resolution
12121212
1213-
Returns
1214-
-------
1215-
a new Timedelta rounded to the given resolution of `freq`
1216-
12171213
Parameters
12181214
----------
12191215
freq : a freq string indicating the rounding resolution
12201216
1217+
Returns
1218+
-------
1219+
a new Timedelta rounded to the given resolution of `freq`
1220+
12211221
Raises
12221222
------
12231223
ValueError if the freq cannot be converted

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,6 @@ class Timestamp(_Timestamp):
767767
"""
768768
Round the Timestamp to the specified resolution
769769
770-
Returns
771-
-------
772-
a new Timestamp rounded to the given resolution of `freq`
773-
774770
Parameters
775771
----------
776772
freq : a freq string indicating the rounding resolution
@@ -793,6 +789,10 @@ class Timestamp(_Timestamp):
793789
794790
.. versionadded:: 0.24.0
795791
792+
Returns
793+
-------
794+
a new Timestamp rounded to the given resolution of `freq`
795+
796796
Raises
797797
------
798798
ValueError if the freq cannot be converted

pandas/core/accessor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,10 @@ def decorator(accessor):
201201
Name under which the accessor should be registered. A warning is issued
202202
if this name conflicts with a preexisting attribute.
203203
204+
See Also
205+
--------
206+
%(others)s
207+
204208
Notes
205209
-----
206210
When accessed, your accessor will be initialized with the pandas object
@@ -250,10 +254,6 @@ def plot(self):
250254
(5.0, 10.0)
251255
>>> ds.geo.plot()
252256
# plots data on a map
253-
254-
See Also
255-
--------
256-
%(others)s
257257
"""
258258

259259

pandas/core/groupby/groupby.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,14 @@ class GroupBy(_GroupBy):
977977
name : string
978978
Most users should ignore this
979979
980+
Returns
981+
-------
982+
**Attributes**
983+
groups : dict
984+
{group name -> group labels}
985+
len(grouped) : int
986+
Number of groups
987+
980988
Notes
981989
-----
982990
After grouping, see aggregate, apply, and transform functions. Here are
@@ -1010,14 +1018,6 @@ class GroupBy(_GroupBy):
10101018
10111019
See the online documentation for full exposition on these topics and much
10121020
more
1013-
1014-
Returns
1015-
-------
1016-
**Attributes**
1017-
groups : dict
1018-
{group name -> group labels}
1019-
len(grouped) : int
1020-
Number of groups
10211021
"""
10221022
def _bool_agg(self, val_test, skipna):
10231023
"""

pandas/core/resample.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ class Resampler(_GroupBy):
5151
kind : str or None
5252
'period', 'timestamp' to override default index treatement
5353
54-
Notes
55-
-----
56-
After resampling, see aggregate, apply, and transform functions.
57-
5854
Returns
5955
-------
6056
a Resampler of the appropriate type
57+
58+
Notes
59+
-----
60+
After resampling, see aggregate, apply, and transform functions.
6161
"""
6262

6363
# to the groupby descriptor

pandas/core/window.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,6 +1294,13 @@ def kurt(self, **kwargs):
12941294
Returned object type is determined by the caller of the %(name)s
12951295
calculation.
12961296
1297+
See Also
1298+
--------
1299+
pandas.Series.quantile : Computes value at the given quantile over all data
1300+
in Series.
1301+
pandas.DataFrame.quantile : Computes values at the given quantile over
1302+
requested axis in DataFrame.
1303+
12971304
Examples
12981305
--------
12991306
>>> s = pd.Series([1, 2, 3, 4])
@@ -1310,13 +1317,6 @@ def kurt(self, **kwargs):
13101317
2 2.5
13111318
3 3.5
13121319
dtype: float64
1313-
1314-
See Also
1315-
--------
1316-
pandas.Series.quantile : Computes value at the given quantile over all data
1317-
in Series.
1318-
pandas.DataFrame.quantile : Computes values at the given quantile over
1319-
requested axis in DataFrame.
13201320
""")
13211321

13221322
def quantile(self, quantile, interpolation='linear', **kwargs):

0 commit comments

Comments
 (0)