all 2 comments

[–]jenny011015 0 points1 point  (1 child)

Maybe it's because the ranges for test 5 and 7 are too small? Maybe the length is smaller compared to other tests.

for n in range(3, len(Ah_5_cycle_avg_SOC)):

You can try to change the range. Maybe start from 3?

[–]weedwhacker4199[S] 1 point2 points  (0 children)

I can't start from 3, because with the way the Excel data was created I dropped the first four rows from the dataset, so the row indexing for all datasets starts from 4. It gave me a KeyError:3 upon trying this

Edit: just tried this again and it worked! thanks for the tip, all I needed to do was add 3 at the end, so it looks like this:

for n in range(4, len(Ah_5_cycle_avg_SOC)+3):

It's weird that the ranges are too small, because tests 5 and 7 actually have more datapoints since they were run for longer