Skip to content

Commit 3d3e408

Browse files
committed
replace with bullet
1 parent 128dadb commit 3d3e408

File tree

4 files changed

+54
-45
lines changed

4 files changed

+54
-45
lines changed

pandas/core/algorithms.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,12 @@ def unique(values):
289289
Returns
290290
-------
291291
unique values
292-
If the input is an Index, the return is an Index.\n
293-
If the input is a Categorical dtype, the return is a Categorical.\n
294-
If the input is a Series/ndarray, the return will be an ndarray.
292+
293+
The return can be:
294+
295+
- If the input is an Index, the return is an Index.
296+
- If the input is a Categorical dtype, the return is a Categorical.
297+
- If the input is a Series/ndarray, the return will be an ndarray.
295298
296299
See Also
297300
--------

pandas/core/frame.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ def to_numpy(self, dtype=None, copy=False):
11611161
11621162
Returns
11631163
-------
1164-
array : numpy.ndarray
1164+
numpy.ndarray
11651165
11661166
See Also
11671167
--------
@@ -1455,7 +1455,7 @@ def from_records(cls, data, index=None, exclude=None, columns=None,
14551455
14561456
Returns
14571457
-------
1458-
df : DataFrame
1458+
DataFrame
14591459
"""
14601460

14611461
# Make a copy of the input columns so we can modify it
@@ -1771,7 +1771,7 @@ def from_items(cls, items, columns=None, orient='columns'):
17711771
17721772
Returns
17731773
-------
1774-
frame : DataFrame
1774+
DataFrame
17751775
"""
17761776

17771777
warnings.warn("from_items is deprecated. Please use "
@@ -1882,7 +1882,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True,
18821882
18831883
Returns
18841884
-------
1885-
y : DataFrame
1885+
DataFrame
18861886
18871887
See Also
18881888
--------
@@ -1972,7 +1972,7 @@ def to_panel(self):
19721972
19731973
Returns
19741974
-------
1975-
panel : Panel
1975+
Panel
19761976
"""
19771977
# only support this kind for now
19781978
if (not isinstance(self.index, MultiIndex) or # pragma: no cover
@@ -2532,7 +2532,7 @@ def memory_usage(self, index=True, deep=False):
25322532
25332533
Returns
25342534
-------
2535-
sizes : Series
2535+
Series
25362536
A Series whose index is the original column names and whose values
25372537
is the memory usage of each column in bytes.
25382538
@@ -2750,7 +2750,7 @@ def get_value(self, index, col, takeable=False):
27502750
27512751
Returns
27522752
-------
2753-
value : scalar value
2753+
scalar value
27542754
"""
27552755

27562756
warnings.warn("get_value is deprecated and will be removed "
@@ -2795,7 +2795,7 @@ def set_value(self, index, col, value, takeable=False):
27952795
27962796
Returns
27972797
-------
2798-
frame : DataFrame
2798+
DataFrame
27992799
If label pair is contained, will be reference to calling DataFrame,
28002800
otherwise a new object.
28012801
"""
@@ -3231,7 +3231,7 @@ def select_dtypes(self, include=None, exclude=None):
32313231
32323232
Returns
32333233
-------
3234-
subset : DataFrame
3234+
DataFrame
32353235
The subset of the frame including the dtypes in ``include`` and
32363236
excluding the dtypes in ``exclude``.
32373237
@@ -3596,7 +3596,7 @@ def _sanitize_column(self, key, value, broadcast=True):
35963596
35973597
Returns
35983598
-------
3599-
sanitized_column : numpy-array
3599+
numpy-array
36003600
"""
36013601

36023602
def reindexer(value):
@@ -3865,7 +3865,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None,
38653865
38663866
Returns
38673867
-------
3868-
dropped : pandas.DataFrame
3868+
pandas.DataFrame
38693869
38703870
Raises
38713871
------
@@ -3990,7 +3990,7 @@ def rename(self, *args, **kwargs):
39903990
39913991
Returns
39923992
-------
3993-
renamed : DataFrame
3993+
DataFrame
39943994
39953995
See Also
39963996
--------
@@ -4639,7 +4639,7 @@ def drop_duplicates(self, subset=None, keep='first', inplace=False):
46394639
46404640
Returns
46414641
-------
4642-
deduplicated : DataFrame
4642+
DataFrame
46434643
"""
46444644
if self.empty:
46454645
return self.copy()
@@ -4673,7 +4673,7 @@ def duplicated(self, subset=None, keep='first'):
46734673
46744674
Returns
46754675
-------
4676-
duplicated : Series
4676+
Series
46774677
"""
46784678
from pandas.core.sorting import get_group_index
46794679
from pandas._libs.hashtable import duplicated_int64, _SIZE_HINT_LIMIT
@@ -5041,7 +5041,7 @@ def swaplevel(self, i=-2, j=-1, axis=0):
50415041
50425042
Returns
50435043
-------
5044-
swapped : same type as caller (new object)
5044+
same type as caller (new object)
50455045
50465046
.. versionchanged:: 0.18.1
50475047
@@ -5320,7 +5320,7 @@ def combine_first(self, other):
53205320
53215321
Returns
53225322
-------
5323-
combined : DataFrame
5323+
DataFrame
53245324
53255325
See Also
53265326
--------
@@ -5681,7 +5681,7 @@ def pivot(self, index=None, columns=None, values=None):
56815681
56825682
Returns
56835683
-------
5684-
table : DataFrame
5684+
DataFrame
56855685
56865686
See Also
56875687
--------
@@ -5967,7 +5967,7 @@ def unstack(self, level=-1, fill_value=None):
59675967
59685968
Returns
59695969
-------
5970-
unstacked : DataFrame or Series
5970+
DataFrame or Series
59715971
59725972
See Also
59735973
--------
@@ -6133,7 +6133,7 @@ def diff(self, periods=1, axis=0):
61336133
61346134
Returns
61356135
-------
6136-
diffed : DataFrame
6136+
DataFrame
61376137
61386138
See Also
61396139
--------
@@ -6405,7 +6405,7 @@ def apply(self, func, axis=0, broadcast=None, raw=False, reduce=None,
64056405
64066406
Returns
64076407
-------
6408-
applied : Series or DataFrame
6408+
Series or DataFrame
64096409
64106410
See Also
64116411
--------
@@ -6598,7 +6598,7 @@ def append(self, other, ignore_index=False,
65986598
65996599
Returns
66006600
-------
6601-
appended : DataFrame
6601+
DataFrame
66026602
66036603
See Also
66046604
--------
@@ -6908,7 +6908,7 @@ def round(self, decimals=0, *args, **kwargs):
69086908
69096909
Returns
69106910
-------
6911-
DataFrame :
6911+
DataFrame
69126912
A DataFrame with the affected columns rounded to the specified
69136913
number of decimal places.
69146914
@@ -7021,7 +7021,7 @@ def corr(self, method='pearson', min_periods=1):
70217021
70227022
Returns
70237023
-------
7024-
y : DataFrame
7024+
DataFrame
70257025
70267026
See Also
70277027
--------
@@ -7215,7 +7215,7 @@ def corrwith(self, other, axis=0, drop=False, method='pearson'):
72157215
72167216
Returns
72177217
-------
7218-
correls : Series
7218+
Series
72197219
72207220
See Also
72217221
-------
@@ -7545,7 +7545,7 @@ def nunique(self, axis=0, dropna=True):
75457545
75467546
Returns
75477547
-------
7548-
nunique : Series
7548+
Series
75497549
75507550
See Also
75517551
--------
@@ -7583,7 +7583,7 @@ def idxmin(self, axis=0, skipna=True):
75837583
75847584
Returns
75857585
-------
7586-
idxmin : Series
7586+
Series
75877587
75887588
Raises
75897589
------
@@ -7619,7 +7619,7 @@ def idxmax(self, axis=0, skipna=True):
76197619
76207620
Returns
76217621
-------
7622-
idxmax : Series
7622+
Series
76237623
76247624
Raises
76257625
------
@@ -7766,7 +7766,7 @@ def quantile(self, q=0.5, axis=0, numeric_only=True,
77667766
77677767
Returns
77687768
-------
7769-
quantiles : Series or DataFrame
7769+
Series or DataFrame
77707770
77717771
If ``q`` is an array, a DataFrame will be returned where the
77727772
index is ``q``, the columns are the columns of self, and the
@@ -7848,7 +7848,7 @@ def to_timestamp(self, freq=None, how='start', axis=0, copy=True):
78487848
78497849
Returns
78507850
-------
7851-
df : DataFrame with DatetimeIndex
7851+
DataFrame with DatetimeIndex
78527852
"""
78537853
new_data = self._data
78547854
if copy:
@@ -7880,7 +7880,7 @@ def to_period(self, freq=None, axis=0, copy=True):
78807880
78817881
Returns
78827882
-------
7883-
ts : TimeSeries with PeriodIndex
7883+
TimeSeries with PeriodIndex
78847884
"""
78857885
new_data = self._data
78867886
if copy:

pandas/core/generic.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4951,11 +4951,14 @@ def pipe(self, func, *args, **kwargs):
49514951
Returns
49524952
-------
49534953
DataFrame, Series or scalar
4954-
If DataFrame.agg is called with a single function, returns a Series.\n
4955-
If DataFrame.agg is called with several functions, returns
4956-
a DataFrame.\n
4957-
If Series.agg is called with single function, returns a scalar.\n
4958-
If Series.agg is called with several functions, returns a Series.
4954+
4955+
The return can be:
4956+
4957+
- If DataFrame.agg is called with a single function, returns a Series.
4958+
- If DataFrame.agg is called with several functions, returns
4959+
a DataFrame.
4960+
- If Series.agg is called with single function, returns a scalar.
4961+
- If Series.agg is called with several functions, returns a Series.
49594962
49604963
%(see_also)s
49614964
@@ -6879,11 +6882,14 @@ def asof(self, where, subset=None):
68796882
-------
68806883
scalar, Series, or DataFrame
68816884
6882-
Scalar : when `self` is a Series and `where` is a scalar
6883-
Series: when `self` is a Series and `where` is an array-like,
6884-
or when `self` is a DataFrame and `where` is a scalar
6885-
DataFrame : when `self` is a DataFrame and `where` is an
6886-
array-like.
6885+
The return can be:
6886+
6887+
* Scalar : when `self` is a Series and `where` is a scalar
6888+
* Series: when `self` is a Series and `where` is an array-like,
6889+
or when `self` is a DataFrame and `where` is a scalar
6890+
* DataFrame : when `self` is a DataFrame and `where` is an
6891+
array-like
6892+
Return scala, Sereis, or DataFrame.
68876893
68886894
See Also
68896895
--------

pandas/plotting/_core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,9 +2060,9 @@ def plot_series(data, kind='line', ax=None, # Series unique
20602060
20612061
For data grouped with ``by``:
20622062
2063-
* :class:`~pandas.Series`
2063+
* :class:`~pandas.Series` \n
20642064
* :class:`~numpy.array` (for ``return_type = None``)
2065-
Return N-dimentional array.
2065+
Return Series or numpy.array.
20662066
20672067
See Also
20682068
--------

0 commit comments

Comments
 (0)