Skip to content

Commit 891c5ea

Browse files
pandas-dev#28792 DOC: Fixed SA04 Errors
1 parent 4e51abf commit 891c5ea

File tree

12 files changed

+53
-41
lines changed

12 files changed

+53
-41
lines changed

pandas/_libs/tslibs/timedeltas.pyx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,8 @@ cdef class _Timedelta(timedelta):
10561056

10571057
See Also
10581058
--------
1059-
Timestamp.isoformat
1059+
Timestamp.isoformat : function is used to convert the given
1060+
Timestamp object into the ISO format.
10601061

10611062
Notes
10621063
-----

pandas/core/arrays/base.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ def _from_factorized(cls, values, original):
232232
233233
See Also
234234
--------
235-
factorize
236-
ExtensionArray.factorize
235+
factorize : Top-level factorize method that dispatches here.
236+
ExtensionArray.factorize : Encode the extension array as an enumerated type.
237237
"""
238238
raise AbstractMethodError(cls)
239239

@@ -501,7 +501,7 @@ def _values_for_argsort(self) -> np.ndarray:
501501
502502
See Also
503503
--------
504-
ExtensionArray.argsort
504+
ExtensionArray.argsort : Return the indices that would sort this array.
505505
"""
506506
# Note: this is used in `ExtensionArray.argsort`.
507507
return np.array(self)
@@ -956,8 +956,8 @@ def take(
956956
957957
See Also
958958
--------
959-
numpy.take
960-
api.extensions.take
959+
numpy.take : Take elements from an array along an axis.
960+
api.extensions.take : Take elements from an array.
961961
962962
Notes
963963
-----

pandas/core/arrays/boolean.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def _values_for_argsort(self) -> np.ndarray:
418418
419419
See Also
420420
--------
421-
ExtensionArray.argsort
421+
ExtensionArray.argsort: Return the indices that would sort this array.
422422
"""
423423
data = self._data.copy()
424424
data[self._mask] = -1

pandas/core/arrays/categorical.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2061,7 +2061,7 @@ def unique(self):
20612061
--------
20622062
pandas.unique
20632063
CategoricalIndex.unique
2064-
Series.unique
2064+
Series.unique : Return unique values of Series object.
20652065
20662066
Examples
20672067
--------

pandas/core/arrays/integer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def _values_for_argsort(self) -> np.ndarray:
484484
485485
See Also
486486
--------
487-
ExtensionArray.argsort
487+
ExtensionArray.argsort: Return the indices that would sort this array.
488488
"""
489489
data = self._data.copy()
490490
if self._mask.any():

pandas/core/dtypes/base.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ class ExtensionDtype:
2121
2222
See Also
2323
--------
24-
extensions.register_extension_dtype
25-
extensions.ExtensionArray
24+
extensions.register_extension_dtype: Register an ExtensionType
25+
with pandas as class decorator.
26+
extensions.ExtensionArray: Abstract base class for custom 1-D array types.
2627
2728
Notes
2829
-----

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def shape(self) -> Tuple[int, int]:
586586
587587
See Also
588588
--------
589-
ndarray.shape
589+
ndarray.shape : Tuple of array dimensions.
590590
591591
Examples
592592
--------

pandas/core/generic.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def attrs(self) -> Dict[Optional[Hashable], Any]:
257257
258258
See Also
259259
--------
260-
DataFrame.flags
260+
DataFrame.flags : Global flags applying to this object.
261261
"""
262262
if self._attrs is None:
263263
self._attrs = {}
@@ -278,8 +278,8 @@ def flags(self) -> Flags:
278278
279279
See Also
280280
--------
281-
Flags
282-
DataFrame.attrs
281+
Flags : Flags that apply to pandas objects.
282+
DataFrame.attrs : Global metadata applying to this dataset.
283283
284284
Notes
285285
-----

pandas/core/groupby/groupby.py

+22-16
Original file line numberDiff line numberDiff line change
@@ -319,9 +319,12 @@ class providing the base-class of operations.
319319
320320
See Also
321321
--------
322-
%(klass)s.groupby.apply
323-
%(klass)s.groupby.aggregate
324-
%(klass)s.transform
322+
%(klass)s.groupby.apply : Apply function func group-wise
323+
and combine the results together.
324+
%(klass)s.groupby.aggregate : Aggregate using one or more
325+
operations over the specified axis.
326+
%(klass)s.transform : Transforms the Series on each group
327+
based on the given function.
325328
326329
Notes
327330
-----
@@ -428,9 +431,12 @@ class providing the base-class of operations.
428431
429432
See Also
430433
--------
431-
{klass}.groupby.apply
432-
{klass}.groupby.transform
433-
{klass}.aggregate
434+
{klass}.groupby.apply : Apply function func group-wise
435+
and combine the results together.
436+
{klass}.groupby.transform : Aggregate using one or more
437+
operations over the specified axis.
438+
{klass}.aggregate : Transforms the Series on each group
439+
based on the given function.
434440
435441
Notes
436442
-----
@@ -1857,8 +1863,8 @@ def _fill(self, direction, limit=None):
18571863
18581864
See Also
18591865
--------
1860-
pad
1861-
backfill
1866+
pad : Returns Series with minimum number of char in object.
1867+
backfill : Backward fill the missing values in the dataset.
18621868
"""
18631869
# Need int value for Cython
18641870
if limit is None:
@@ -1892,10 +1898,10 @@ def pad(self, limit=None):
18921898
18931899
See Also
18941900
--------
1895-
Series.pad
1896-
DataFrame.pad
1897-
Series.fillna
1898-
DataFrame.fillna
1901+
Series.pad: Returns Series with minimum number of char in object.
1902+
DataFrame.pad: Object with missing values filled or None if inplace=True.
1903+
Series.fillna: Fill NaN values of a Series.
1904+
DataFrame.fillna: Fill NaN values of a DataFrame.
18991905
"""
19001906
return self._fill("ffill", limit=limit)
19011907

@@ -1918,10 +1924,10 @@ def backfill(self, limit=None):
19181924
19191925
See Also
19201926
--------
1921-
Series.backfill
1922-
DataFrame.backfill
1923-
Series.fillna
1924-
DataFrame.fillna
1927+
Series.backfill : Backward fill the missing values in the dataset.
1928+
DataFrame.backfill: Backward fill the missing values in the dataset
1929+
Series.fillna: Fill NaN values of a Series.
1930+
DataFrame.fillna: Fill NaN values of a DataFrame.
19251931
"""
19261932
return self._fill("bfill", limit=limit)
19271933

pandas/core/indexes/accessors.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,8 @@ def to_pytimedelta(self) -> np.ndarray:
326326
327327
See Also
328328
--------
329-
datetime.timedelta
329+
datetime.timedelta : A duration expressing the difference
330+
between two date, time, or datetime.
330331
331332
Examples
332333
--------

pandas/core/indexes/base.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def ravel(self, order="C"):
609609
610610
See Also
611611
--------
612-
numpy.ndarray.ravel
612+
numpy.ndarray.ravel : Return a flattened array.
613613
"""
614614
warnings.warn(
615615
"Index.ravel returning ndarray is deprecated; in a future version "
@@ -705,7 +705,8 @@ def astype(self, dtype, copy=True):
705705
706706
See Also
707707
--------
708-
numpy.ndarray.take
708+
numpy.ndarray.take: Return an array formed from the
709+
elements of a at the given indices.
709710
"""
710711

711712
@Appender(_index_shared_docs["take"] % _index_doc_kwargs)
@@ -2298,8 +2299,8 @@ def unique(self, level=None):
22982299
22992300
See Also
23002301
--------
2301-
unique
2302-
Series.unique
2302+
unique : Numpy array of unique values in that column.
2303+
Series.unique : Return unique values of Series object.
23032304
"""
23042305
if level is not None:
23052306
self._validate_index_level(level)
@@ -4229,7 +4230,8 @@ def putmask(self, mask, value):
42294230
42304231
See Also
42314232
--------
4232-
numpy.ndarray.putmask
4233+
numpy.ndarray.putmask : Changes elements of an array
4234+
based on conditional and input values.
42334235
"""
42344236
values = self.values.copy()
42354237
try:

pandas/io/formats/style.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,8 @@ def applymap(self, func: Callable, subset=None, **kwargs) -> "Styler":
829829
830830
See Also
831831
--------
832-
Styler.where
832+
Styler.where: Updates the HTML representation with a style which is
833+
selected in accordance with the return value of a function.
833834
"""
834835
self._todo.append(
835836
(lambda instance: getattr(instance, "_applymap"), (func, subset), kwargs)
@@ -870,7 +871,7 @@ def where(
870871
871872
See Also
872873
--------
873-
Styler.applymap
874+
Styler.applymap: Updates the HTML representation with the result.
874875
"""
875876
if other is None:
876877
other = ""
@@ -930,7 +931,7 @@ def export(self) -> List[Tuple[Callable, Tuple, Dict]]:
930931
931932
See Also
932933
--------
933-
Styler.use
934+
Styler.use: Set the styles on the current Styler.
934935
"""
935936
return self._todo
936937

@@ -951,7 +952,7 @@ def use(self, styles: List[Tuple[Callable, Tuple, Dict]]) -> "Styler":
951952
952953
See Also
953954
--------
954-
Styler.export
955+
Styler.export : Export the styles to applied to the current Styler.
955956
"""
956957
self._todo.extend(styles)
957958
return self

0 commit comments

Comments
 (0)