0
frame = []
for i in range(1,21):
frame.append(sampler(i))
# sampler is a function which return an array of 764*36
header = ['Act_High', 'Act_Low', 'Act_Avg', 'Precip_Amt', 'Festival_Impact',
'Val_Share', 'Variable_Disc___ValueOff__Rs',
'Non_Discounted_Gross_Revenue__Rs__', 'Fixed_Disc___ValueOff__Rs',
'Total_Volume__No__', 'unitMrp', 'Variable_Disc___PerOff__Rs',
'Fixed_Disc___FOC__Rs', 'Variable_Disc___FOC__Rs',
'Fixed_Disc___PerOff__Rs', 'Total_Volume__No__rmean',
'Non_Discounted_Gross_Revenue__Rs__rmean', 'Total_Volume__No__rmax',
'Non_Discounted_Gross_Revenue__Rs__rmax', 'Total_Volume__No__rmin',
'Non_Discounted_Gross_Revenue__Rs__rmin', 'Total_Volume__No__rstd',
'Non_Discounted_Gross_Revenue__Rs__rstd', 'Total_Volume__No__rymean',
'Non_Discounted_Gross_Revenue__Rs__rymean', 'Apr', 'Aug', 'Dec',
'Feb', 'Jan', 'Jul', 'Jun', 'Mar', 'May', 'Nov', 'Oct', 'Sep']
frame = np.nan_to_num(frame)
frame = pd.DataFrame(frame, columns = header)
ValueError: Shape of passed values is (1, 20), indices imply (37, 20)
采样器做了什么? – Eliethesaiyan
确实采样器做你认为它做的? for循环之后框架是什么样的? – Baldrickk
sampler(1).shape - >(767,37) –