ix to loc
This commit is contained in:
@@ -319,13 +319,13 @@ def getmaxwattinterval(tt,ww,i):
|
||||
# indexmaxpos = indexmax.get_loc(indexmax)
|
||||
indexmaxpos = indexmax
|
||||
try:
|
||||
t_0 = tt.ix[indexmaxpos]
|
||||
t_1 = tt.ix[indexmaxpos-i]
|
||||
deltas = tt.ix[indexmaxpos-i:indexmaxpos].diff().dropna()
|
||||
t_0 = tt.loc[indexmaxpos]
|
||||
t_1 = tt.loc[indexmaxpos-i]
|
||||
deltas = tt.loc[indexmaxpos-i:indexmaxpos].diff().dropna()
|
||||
testres = 1.0e-3*deltas.max() < 30.
|
||||
if testres:
|
||||
deltat = 1.0e-3*(t_0-t_1)
|
||||
wmax = w_roll.ix[indexmaxpos]
|
||||
wmax = w_roll.loc[indexmaxpos]
|
||||
#if wmax > 800 or wmax*5.0e-4*deltat > 800.0:
|
||||
# wmax = 0
|
||||
else:
|
||||
|
||||
@@ -1189,7 +1189,7 @@ class FusionMetricChoiceForm(ModelForm):
|
||||
labeldict = {key:value for key,value in self.fields['columns'].choices}
|
||||
|
||||
for label in labeldict:
|
||||
if df.ix[:,label].std() == 0:
|
||||
if df.loc[:,label].std() == 0:
|
||||
try:
|
||||
formaxlabels2.pop(label)
|
||||
except KeyError:
|
||||
|
||||
Reference in New Issue
Block a user