Skip to content

Commit a99ef99

Browse files
DOC: Update param descriptions for axis in NDFrame methods (#28253)
1 parent baf5df4 commit a99ef99

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

pandas/core/generic.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -2533,8 +2533,9 @@ def to_msgpack(self, path_or_buf=None, encoding="utf-8", **kwargs):
25332533
25342534
Parameters
25352535
----------
2536-
path : str (file path), buffer-like, or None
2537-
if None, return generated bytes
2536+
path : str, buffer-like, or None
2537+
Destination for the serialized object.
2538+
If None, return generated bytes
25382539
append : bool whether to append to an existing msgpack
25392540
(default is False)
25402541
compress : type of compressor (zlib or blosc), default to None (no
@@ -4621,7 +4622,7 @@ def filter(self, items=None, like=None, regex=None, axis=None):
46214622
Keep labels from axis for which "like in label == True".
46224623
regex : str (regular expression)
46234624
Keep labels from axis for which re.search(regex, label) == True.
4624-
axis : int or str
4625+
axis : {0 or ‘index’, 1 or ‘columns’, None}, default None
46254626
The axis to filter on, expressed either as an index (int)
46264627
or axis name (str). By default this is the info axis,
46274628
'index' for Series, 'columns' for DataFrame.
@@ -4856,7 +4857,7 @@ def sample(
48564857
random_state : int or numpy.random.RandomState, optional
48574858
Seed for the random number generator (if int), or numpy RandomState
48584859
object.
4859-
axis : int or str, optional
4860+
axis : {0 or ‘index’, 1 or ‘columns’, None}, default None
48604861
Axis to sample. Accepts axis number or name. Default is stat axis
48614862
for given data type (0 for Series and DataFrames).
48624863
@@ -9444,7 +9445,7 @@ def tshift(self, periods=1, freq=None, axis=0):
94449445
freq : DateOffset, timedelta, or str, default None
94459446
Increment to use from the tseries module
94469447
or time rule expressed as a string (e.g. 'EOM')
9447-
axis : int or str
9448+
axis : {0 or ‘index’, 1 or ‘columns’, None}, default 0
94489449
Corresponds to the axis that contains the Index
94499450
94509451
Returns

0 commit comments

Comments
 (0)