import numpy as np import pandas as pd #There are two ways to get the reciprocal of a dataframe: #First way: df.rdiv(1) #Second way: np.reciprocal(df) #If you want the reciprocal of just one row then use .iloc[] #to do that