For finding the multples of 4, we will use the argwhere() function. First, we will create a list of 10 numbers –
s1 = pd.Series([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
np.argwhere(ser % 4==0)
Output > [3], [7]
For finding the multples of 4, we will use the argwhere() function. First, we will create a list of 10 numbers –
s1 = pd.Series([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
np.argwhere(ser % 4==0)
Output > [3], [7]