import numpy as np
import pandas as pd
# coefficient of variation
def cov(se):
return np.std(se) / np.mean(se)
# 使用方法
if __name__ == '__main__':
dataframe = pd.DataFrame(data=[1, 2, 3, 4, 5], columns=['column'])
print(cov(dataframe['column']))