Skip to content

Commit 8a32eef

Browse files
committed
index into the series using iloc
1 parent c5e7cde commit 8a32eef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: pecos/graphics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def plot_timeseries(data, tfilter=None, test_results_group=None, xaxis_min=None,
157157
temp = np.append(temp[0],len(tfilter)-1)
158158
count = 0
159159
for i in range(len(temp)-1):
160-
if tfilter[temp[i]] == 0:
160+
if tfilter.iloc[temp[i]] == 0:
161161
if count == 0:
162162
ax.axvspan(data.index[temp[i]], data.index[temp[i+1]],
163163
facecolor='k', alpha=0.2, label='Time filter')

Diff for: pecos/tests/test_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_evaluate_string_index(self):
157157
string_to_eval = "({CLOCK_TIME} > 3*3600) & ({CLOCK_TIME} < 21*3600)"
158158
x = pecos.utils.evaluate_string(string_to_eval, self.df)
159159

160-
self.assertEqual(x.sum()[0], 72-4*3-3*3)
160+
self.assertEqual(x.sum().iloc[0], 72-4*3-3*3)
161161

162162
def test_evaluate_string_specs(self):
163163
string_to_eval = "{A}*5"

0 commit comments

Comments
 (0)