Skip to content

Commit e6cacf5

Browse files
jb8429Nico Cernek
authored and
Nico Cernek
committed
DOC: Fixed PR08 docstring errors in pandas.DataFrame (pandas-dev#28655)
1 parent eede787 commit e6cacf5

File tree

3 files changed

+34
-24
lines changed

3 files changed

+34
-24
lines changed

pandas/core/frame.py

+20-12
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ def to_feather(self, fname):
20662066
Parameters
20672067
----------
20682068
fname : str
2069-
string file path
2069+
String file path.
20702070
"""
20712071
from pandas.io.feather_format import to_feather
20722072

@@ -4772,6 +4772,7 @@ def drop_duplicates(self, subset=None, keep="first", inplace=False):
47724772
Only consider certain columns for identifying duplicates, by
47734773
default use all of the columns
47744774
keep : {'first', 'last', False}, default 'first'
4775+
Determines which duplicates (if any) to keep.
47754776
- ``first`` : Drop duplicates except for the first occurrence.
47764777
- ``last`` : Drop duplicates except for the last occurrence.
47774778
- False : Drop all duplicates.
@@ -4806,10 +4807,10 @@ def duplicated(self, subset=None, keep="first"):
48064807
Only consider certain columns for identifying duplicates, by
48074808
default use all of the columns
48084809
keep : {'first', 'last', False}, default 'first'
4809-
- ``first`` : Mark duplicates as ``True`` except for the
4810-
first occurrence.
4811-
- ``last`` : Mark duplicates as ``True`` except for the
4812-
last occurrence.
4810+
Determines which duplicates (if any) to mark.
4811+
4812+
- ``first`` : Mark duplicates as ``True`` except for the first occurrence.
4813+
- ``last`` : Mark duplicates as ``True`` except for the last occurrence.
48134814
- False : Mark all duplicates as ``True``.
48144815
48154816
Returns
@@ -6233,8 +6234,8 @@ def unstack(self, level=-1, fill_value=None):
62336234
----------
62346235
level : int, str, or list of these, default -1 (last level)
62356236
Level(s) of index to unstack, can pass level name
6236-
fill_value : replace NaN with this value if the unstack produces
6237-
missing values
6237+
fill_value : int, string or dict
6238+
Replace NaN with this value if the unstack produces missing values
62386239
62396240
Returns
62406241
-------
@@ -6665,6 +6666,8 @@ def apply(
66656666
by result_type='broadcast'.
66666667
66676668
raw : bool, default False
6669+
Determines if row or column is passed as a Series or ndarry object:
6670+
66686671
* ``False`` : passes each row or column as a Series to the
66696672
function.
66706673
* ``True`` : the passed function will receive ndarray objects
@@ -7357,6 +7360,8 @@ def corr(self, method="pearson", min_periods=1):
73577360
Parameters
73587361
----------
73597362
method : {'pearson', 'kendall', 'spearman'} or callable
7363+
Method of correlation:
7364+
73607365
* pearson : standard correlation coefficient
73617366
* kendall : Kendall Tau correlation coefficient
73627367
* spearman : Spearman rank correlation
@@ -7556,10 +7561,13 @@ def corrwith(self, other, axis=0, drop=False, method="pearson"):
75567561
other : DataFrame, Series
75577562
Object with which to compute correlations.
75587563
axis : {0 or 'index', 1 or 'columns'}, default 0
7559-
0 or 'index' to compute column-wise, 1 or 'columns' for row-wise.
7564+
The axis to use. 0 or 'index' to compute column-wise, 1 or 'columns' for
7565+
row-wise.
75607566
drop : bool, default False
75617567
Drop missing indices from result.
75627568
method : {'pearson', 'kendall', 'spearman'} or callable
7569+
Method of correlation:
7570+
75637571
* pearson : standard correlation coefficient
75647572
* kendall : Kendall Tau correlation coefficient
75657573
* spearman : Spearman rank correlation
@@ -7939,8 +7947,8 @@ def idxmin(self, axis=0, skipna=True):
79397947
Parameters
79407948
----------
79417949
axis : {0 or 'index', 1 or 'columns'}, default 0
7942-
0 or 'index' for row-wise, 1 or 'columns' for column-wise
7943-
skipna : bool, default True
7950+
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise
7951+
skipna : boolean, default True
79447952
Exclude NA/null values. If an entire row/column is NA, the result
79457953
will be NA.
79467954
@@ -7976,8 +7984,8 @@ def idxmax(self, axis=0, skipna=True):
79767984
Parameters
79777985
----------
79787986
axis : {0 or 'index', 1 or 'columns'}, default 0
7979-
0 or 'index' for row-wise, 1 or 'columns' for column-wise
7980-
skipna : bool, default True
7987+
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise
7988+
skipna : boolean, default True
79817989
Exclude NA/null values. If an entire row/column is NA, the result
79827990
will be NA.
79837991

pandas/core/generic.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -2559,10 +2559,10 @@ def to_msgpack(self, path_or_buf=None, encoding="utf-8", **kwargs):
25592559
path : str, buffer-like, or None
25602560
Destination for the serialized object.
25612561
If None, return generated bytes
2562-
append : bool whether to append to an existing msgpack
2563-
(default is False)
2564-
compress : type of compressor (zlib or blosc), default to None (no
2565-
compression)
2562+
append : bool, default False
2563+
Whether to append to an existing msgpack.
2564+
compress : str, default None
2565+
Type of compressor (zlib, blosc or None).
25662566
25672567
Returns
25682568
-------
@@ -2797,10 +2797,10 @@ def to_clipboard(self, excel=True, sep=None, **kwargs):
27972797
Parameters
27982798
----------
27992799
excel : bool, default True
2800-
- True, use the provided separator, writing in a csv format for
2801-
allowing easy pasting into excel.
2802-
- False, write a string representation of the object to the
2803-
clipboard.
2800+
Produce output in a csv format for easy pasting into excel.
2801+
2802+
- True, use the provided separator for csv pasting.
2803+
- False, write a string representation of the object to the clipboard.
28042804
28052805
sep : str, default ``'\t'``
28062806
Field delimiter.
@@ -5024,15 +5024,15 @@ def sample(
50245024
Parameters
50255025
----------
50265026
func : function
5027-
function to apply to the %(klass)s.
5027+
Function to apply to the %(klass)s.
50285028
``args``, and ``kwargs`` are passed into ``func``.
50295029
Alternatively a ``(callable, data_keyword)`` tuple where
50305030
``data_keyword`` is a string indicating the keyword of
50315031
``callable`` that expects the %(klass)s.
50325032
args : iterable, optional
5033-
positional arguments passed into ``func``.
5033+
Positional arguments passed into ``func``.
50345034
kwargs : mapping, optional
5035-
a dictionary of keyword arguments passed into ``func``.
5035+
A dictionary of keyword arguments passed into ``func``.
50365036
50375037
Returns
50385038
-------

pandas/plotting/_core.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,8 @@ class PlotAccessor(PandasObject):
514514
Allows plotting of one column versus another. Only used if data is a
515515
DataFrame.
516516
kind : str
517+
The kind of plot to produce:
518+
517519
- 'line' : line plot (default)
518520
- 'bar' : vertical bar plot
519521
- 'barh' : horizontal bar plot
@@ -537,7 +539,7 @@ class PlotAccessor(PandasObject):
537539
legend : False/True/'reverse'
538540
Place legend on axis subplots
539541
style : list or dict
540-
matplotlib line style per column
542+
The matplotlib line style per column
541543
logx : bool or 'sym', default False
542544
Use log scaling or symlog scaling on x axis
543545
.. versionchanged:: 0.25.0

0 commit comments

Comments
 (0)