pillargg / pillar_algos

Finds best timestamps to cut at
https://docs.pillar.gg/pillar_algos/
GNU General Public License v3.0
1 stars 0 forks source link

ERROR with algo2 #12

Closed RusseII closed 3 years ago

RusseII commented 3 years ago

Error with algo2:

I sent a dataset that is failing via slack. 981828174

[ERROR] IndexError: single positional indexer is out-of-boundsTraceback (most recent call last):  File "/var/task/handler.py", line 34, in handler    algo2_result = algo2.run(all_messages)  File "/var/task/pillaralgos/algo2.py", line 118, in run    results, first_stamp = thalamus(bigdf, min)  File "/var/task/pillaralgos/algo2.py", line 40, in thalamus    hour = chunk.iloc[-1,11] # col 11 is hour.  File "/var/task/pandas/core/indexing.py", line 889, in getitem    return self._getitem_tuple(key)  File "/var/task/pandas/core/indexing.py", line 1450, in _getitem_tuple    self._has_valid_tuple(tup)  File "/var/task/pandas/core/indexing.py", line 723, in _has_valid_tuple    self._validate_key(k, i)  File "/var/task/pandas/core/indexing.py", line 1358, in _validate_key    self._validate_integer(key, axis)  File "/var/task/pandas/core/indexing.py", line 1444, in _validate_integer    raise IndexError("single positional indexer is out-of-bounds")

pomkos commented 3 years ago

Looks like there was a chunk with just one timestamp in it? I'll check it out

pomkos commented 3 years ago

From Russ: 160/200 datasets had this issue.

pomkos commented 3 years ago

https://github.com/pillargg/twitch_chat_analysis/blob/46c0415a6646a7f346db9054a85f0e02f8af8891/pypi/pillaralgos/algo2.py#L40

pomkos commented 3 years ago

Made line relative, no more referencing index position of columns. Pushing pypi.