TimedeltaIndex.argmax()
Pandas TimedeltaIndex.argmax()
returns the indices of the maximum values along the axis in the object TimedeltaIndex. The function is similar to numpy.ndarray.argmax
.
Syntax: TimedeltaIndex.argmax (axis = None, * args, ** kwargs)
Parameters:
axis: NoneReturn: integer index value
Example # 1: Use TimedeltaIndex.argmax ()
to find the indexes of the maximum value in a given TimedeltaIndex.
|
Output:
We will now print the index of the maximum value in the tidx object.
|
Output:
As we can see in the output, TimedeltaIndex.argmax ()
has 4, indicating that the maximum value in the tidx object is present at the 4th index.
Example # 2 : Use TimedeltaIndex.argmax ()
to find the indexes of the maximum value in a given TimedeltaIndex.
|
Output:
We will now print the index of the maximum value in the tidx object.
|
Output:
As we can see in the output, TimedeltaIndex.argmax ()
has 1, which indicates that the maximum value in the tidx object is in the first index.