Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages.
Pandas is one of those packages and makes importing and analyzing data much easier.
Pandas
Index.argmin() function returns the indices of the minimum value present in the input Index. If we are having more than one minimum value (i.e. minimum value is present more than once) then it returns the index of the first occurrence of the minimum value.
Syntax: Index.argmin(axis=None)
Parameter: Doesn't take any parameter
Example #1: Use
Index.argmin() function to find the index of the minimum value present in the given Index.
Output :
👁 Image
Let's find the index of the minimum value present in our Index.
Output :
4
As we can see in the output, The minimum value in the Index is 0 and its index is 4 so the output is 4.
Example #2: Use
Index.argmin() function to find the index of the minimum value when we are having minimum value repeated more than once.
Output :
👁 Image
Let's find the index of the minimum value.