python - Avoid "single positional indexer is out-of-bounds" error when ...
where is problem When I did it with 5 consecutive rows my script worked, however when I try it with (at least) 10 rows, this error occurrs: IndexError: single positional indexer is out-of-bounds. It happens because some dataframes doesn't meet the criteria and the value in "Col2" is not here 10 consecutive rows. how I want to solve it (I guess)