Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy.interpolate import LinearNDInterpolator as LND
- Ddump = pd.read_csv('C:....csv', header='infer', low_memory=False, dtype = np.float64)
- X = Ddump.iloc[:,:4].values
- Y = Ddump.iloc[:,4:].values
- hull={}
- List = Ddump.iloc[:,4:].head().columns.to_list()
- for i in range(Y.shape[1]):
- Fit = LND(X,Y[:,i])
- hull[List[i].format(i)] = Fit
- Set = 'S19'
- PVec = np.array([0.1111 , 67.42, -.22, 1.97])
- [in] hull[Set](PVec)
- [out] array([2179.0411926])
- @xw.func
- @xw.arg('Set', str)
- @xw.arg('Prices', np.array, ndim=2)
- def LND(Set,Prices):
- return hull[Set](Prices)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement