Skip to content

Commit 61362be

Browse files
albertvillanovadatapythonista
authored andcommitted
Fix sphinx directives in docstrings that were considered comments (#27621)
1 parent f6a5dd4 commit 61362be

File tree

12 files changed

+28
-28
lines changed

12 files changed

+28
-28
lines changed

pandas/core/arrays/numpy_.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class PandasArray(ExtensionArray, ExtensionOpsMixin, NDArrayOperatorsMixin):
9090
"""
9191
A pandas ExtensionArray for NumPy data.
9292
93-
.. versionadded :: 0.24.0
93+
.. versionadded:: 0.24.0
9494
9595
This is mostly for internal compatibility, and is not especially
9696
useful on its own.

pandas/core/arrays/sparse.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2102,7 +2102,7 @@ class SparseFrameAccessor(BaseAccessor, PandasDelegate):
21022102
"""
21032103
DataFrame accessor for sparse data.
21042104
2105-
.. versionadded :: 0.25.0
2105+
.. versionadded:: 0.25.0
21062106
"""
21072107

21082108
def _validate(self, data):

pandas/core/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ def item(self):
727727
"""
728728
Return the first element of the underlying data as a python scalar.
729729
730-
.. deprecated 0.25.0
730+
.. deprecated:: 0.25.0
731731
732732
Returns
733733
-------
@@ -1559,7 +1559,7 @@ def factorize(self, sort=False, na_sentinel=-1):
15591559
A scalar or array of insertion points with the
15601560
same shape as `value`.
15611561
1562-
.. versionchanged :: 0.24.0
1562+
.. versionchanged:: 0.24.0
15631563
If `value` is a scalar, an int is now always returned.
15641564
Previously, scalar inputs returned an 1-item array for
15651565
:class:`Series` and :class:`Categorical`.

pandas/core/frame.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,11 @@ class DataFrame(NDFrame):
310310
data : ndarray (structured or homogeneous), Iterable, dict, or DataFrame
311311
Dict can contain Series, arrays, constants, or list-like objects
312312
313-
.. versionchanged :: 0.23.0
313+
.. versionchanged:: 0.23.0
314314
If data is a dict, column order follows insertion-order for
315315
Python 3.6 and later.
316316
317-
.. versionchanged :: 0.25.0
317+
.. versionchanged:: 0.25.0
318318
If data is a list of dicts, column order follows insertion-order
319319
Python 3.6 and later.
320320
@@ -3559,7 +3559,7 @@ def assign(self, **kwargs):
35593559
or modified columns. All items are computed first, and then assigned
35603560
in alphabetical order.
35613561
3562-
.. versionchanged :: 0.23.0
3562+
.. versionchanged:: 0.23.0
35633563
35643564
Keyword argument order is maintained for Python 3.6 and later.
35653565
@@ -5627,7 +5627,7 @@ def update(
56275627
If 'raise', will raise a ValueError if the DataFrame and `other`
56285628
both contain non-NA data in the same place.
56295629
5630-
.. versionchanged :: 0.24.0
5630+
.. versionchanged:: 0.24.0
56315631
Changed from `raise_conflict=False|True`
56325632
to `errors='ignore'|'raise'`.
56335633
@@ -5773,7 +5773,7 @@ def update(
57735773
specified, all remaining columns will be used and the result will
57745774
have hierarchically indexed columns.
57755775
5776-
.. versionchanged :: 0.23.0
5776+
.. versionchanged:: 0.23.0
57775777
Also accept list of column names.
57785778
57795779
Returns
@@ -5902,7 +5902,7 @@ def pivot(self, index=None, columns=None, values=None):
59025902
If True: only show observed values for categorical groupers.
59035903
If False: show all values for categorical groupers.
59045904
5905-
.. versionchanged :: 0.25.0
5905+
.. versionchanged:: 0.25.0
59065906
59075907
Returns
59085908
-------

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11490,7 +11490,7 @@ def _doc_parms(cls):
1149011490
The required number of valid values to perform the operation. If fewer than
1149111491
``min_count`` non-NA values are present the result will be NA.
1149211492
11493-
.. versionadded :: 0.22.0
11493+
.. versionadded:: 0.22.0
1149411494
1149511495
Added with the default being 0. This means the sum of an all-NA
1149611496
or empty Series is 0, and the product of an all-NA or empty

pandas/core/indexes/period.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ def item(self):
931931
return the first element of the underlying data as a python
932932
scalar
933933
934-
.. deprecated 0.25.0
934+
.. deprecated:: 0.25.0
935935
936936
"""
937937
warnings.warn(

pandas/core/series.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
156156
data : array-like, Iterable, dict, or scalar value
157157
Contains data stored in Series.
158158
159-
.. versionchanged :: 0.23.0
159+
.. versionchanged:: 0.23.0
160160
If data is a dict, argument order is maintained for Python 3.6
161161
and later.
162162
@@ -370,7 +370,7 @@ def from_array(
370370
"""
371371
Construct Series from array.
372372
373-
.. deprecated :: 0.23.0
373+
.. deprecated:: 0.23.0
374374
Use pd.Series(..) constructor instead.
375375
376376
Returns
@@ -597,7 +597,7 @@ def asobject(self):
597597
"""
598598
Return object Series which contains boxed values.
599599
600-
.. deprecated :: 0.23.0
600+
.. deprecated:: 0.23.0
601601
602602
Use ``astype(object)`` instead.
603603
@@ -952,7 +952,7 @@ def real(self):
952952
"""
953953
Return the real value of vector.
954954
955-
.. deprecated 0.25.0
955+
.. deprecated:: 0.25.0
956956
"""
957957
warnings.warn(
958958
"`real` has be deprecated and will be removed in a future version",
@@ -970,7 +970,7 @@ def imag(self):
970970
"""
971971
Return imag value of vector.
972972
973-
.. deprecated 0.25.0
973+
.. deprecated:: 0.25.0
974974
"""
975975
warnings.warn(
976976
"`imag` has be deprecated and will be removed in a future version",

pandas/core/sparse/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class SparseDataFrame(DataFrame):
4949
Parameters
5050
----------
5151
data : same types as can be passed to DataFrame or scipy.sparse.spmatrix
52-
.. versionchanged :: 0.23.0
52+
.. versionchanged:: 0.23.0
5353
If data is a dict, argument order is maintained for Python 3.6
5454
and later.
5555

pandas/core/sparse/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class SparseSeries(Series):
5555
Parameters
5656
----------
5757
data : {array-like, Series, SparseSeries, dict}
58-
.. versionchanged :: 0.23.0
58+
.. versionchanged:: 0.23.0
5959
If data is a dict, argument order is maintained for Python 3.6
6060
and later.
6161

pandas/io/feather_format.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def read_feather(path, columns=None, use_threads=True):
7171
"""
7272
Load a feather-format object from the file path.
7373
74-
.. versionadded 0.20.0
74+
.. versionadded:: 0.20.0
7575
7676
Parameters
7777
----------
@@ -90,16 +90,16 @@ def read_feather(path, columns=None, use_threads=True):
9090
columns : sequence, default None
9191
If not provided, all columns are read.
9292
93-
.. versionadded 0.24.0
93+
.. versionadded:: 0.24.0
9494
nthreads : int, default 1
9595
Number of CPU threads to use when reading to pandas.DataFrame.
9696
97-
.. versionadded 0.21.0
98-
.. deprecated 0.24.0
97+
.. versionadded:: 0.21.0
98+
.. deprecated:: 0.24.0
9999
use_threads : bool, default True
100100
Whether to parallelize reading using multiple threads.
101101
102-
.. versionadded 0.24.0
102+
.. versionadded:: 0.24.0
103103
104104
Returns
105105
-------

pandas/io/parquet.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def to_parquet(
231231
``False``, they will not be written to the file. If ``None``, the
232232
engine's default behavior will be used.
233233
234-
.. versionadded 0.24.0
234+
.. versionadded:: 0.24.0
235235
236236
partition_cols : list, optional, default None
237237
Column names by which to partition the dataset
@@ -257,7 +257,7 @@ def read_parquet(path, engine="auto", columns=None, **kwargs):
257257
"""
258258
Load a parquet object from the file path, returning a DataFrame.
259259
260-
.. versionadded 0.21.0
260+
.. versionadded:: 0.21.0
261261
262262
Parameters
263263
----------
@@ -281,7 +281,7 @@ def read_parquet(path, engine="auto", columns=None, **kwargs):
281281
columns : list, default=None
282282
If not None, only these columns will be read from the file.
283283
284-
.. versionadded 0.21.1
284+
.. versionadded:: 0.21.1
285285
**kwargs
286286
Any additional kwargs are passed to the engine.
287287

pandas/io/spss.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def read_spss(
1515
"""
1616
Load an SPSS file from the file path, returning a DataFrame.
1717
18-
.. versionadded 0.25.0
18+
.. versionadded:: 0.25.0
1919
2020
Parameters
2121
----------

0 commit comments

Comments
 (0)