Skip to content

Commit 5471ca3

Browse files
committed
DOC: Improved the docstring of pandas.Series.truncate
1 parent 4131149 commit 5471ca3

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

pandas/core/generic.py

+15-11
Original file line numberDiff line numberDiff line change
@@ -6888,29 +6888,33 @@ def tshift(self, periods=1, freq=None, axis=0):
68886888

68896889
def truncate(self, before=None, after=None, axis=None, copy=True):
68906890
"""
6891-
Truncates a sorted DataFrame/Series before and/or after some
6892-
particular index value. If the axis contains only datetime values,
6891+
Truncate a DataFrame/Series before/after some index value.
6892+
6893+
If the axis contains only datetime values,
68936894
before/after parameters are converted to datetime values.
68946895
68956896
Parameters
68966897
----------
68976898
before : date, string, int
6898-
Truncate all rows before this index value
6899+
Truncate all rows before this index value.
68996900
after : date, string, int
6900-
Truncate all rows after this index value
6901+
Truncate all rows after this index value.
69016902
axis : {0 or 'index', 1 or 'columns'}
6902-
6903-
* 0 or 'index': apply truncation to rows
6904-
* 1 or 'columns': apply truncation to columns
6905-
69066903
Default is stat axis for given data type (0 for Series and
6907-
DataFrames, 1 for Panels)
6904+
DataFrames, 1 for Panels).
69086905
copy : boolean, default is True,
6909-
return a copy of the truncated section
6906+
Return a copy of the truncated section.
69106907
69116908
Returns
69126909
-------
6913-
truncated : type of caller
6910+
type of caller
6911+
The truncated DataFrame/Series.
6912+
6913+
See Also
6914+
--------
6915+
DataFrame.truncate : Truncate a DataFrame before/after some index
6916+
value.
6917+
Series.truncate : Truncate a Series before/after some index value.
69146918
69156919
Examples
69166920
--------

0 commit comments

Comments
 (0)