在python中引导DataFrame

时间:2017-12-15 17:50:50

标签: python excel dataframe

我正在尝试使用bootsrtaping技术重新取样我的数据集但没有成功,我的代码如下:

import pandas as pd
import numpy as np
from openpyxl import Workbook
from pandas import ExcelWriter
import matplotlib.pyplot as plt
import bootstrap as btstrap
#import scikits.bootstrap as sci
from matplotlib import pyplot as plt
import numpy.random as npr
sta_9147="//Users/talhadidi/Private/Desktop/9147.xlsx"
xlsx=pd.ExcelFile(sta_9147)
df1=pd.read_excel(xlsx,'Sheet1')
df1.columns=df1.columns.astype(str)
x_resample = btstrap(['AveOn','AveOff','AveLd','DOOR_OPEN_SEC'], n=10000)
writer=pd.ExcelWriter("/ Users/talhadidi/Private/Desktop/testt5.xlsx")
df2.to_excel(writer,'Sheet1')
writer.save()

我一直得到的错误是: TypeError:'module'对象不可调用, 任何人都可以帮忙,特别感谢提前。

0 个答案:

没有答案