📜  python 倒数 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:05.831000             🧑  作者: Mango

代码示例1
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