Write a Python program to find the positions of numbers that are multiples of 3 from a series


Topic: Write a Python program to find the positions of numbers that are multiples of 3 from a series

Solution

import pandas as pd
import numpy as np
ser = pd.Series(np.random.randint(1, 10, 7))
print(np.argwhere(ser.values % 3 == 0))



List all Python Programs