The following "for" loop is giving error. The variable impf_idx is a list. How can I fix the error.
Traceback (most recent call last): File imp_features.py", line 262, in <module> for i in range(10, 20, impf_idx):TypeError: 'list' object cannot be interpreted as an integer
Traceback (most recent call last):
File imp_features.py", line 262, in <module>
for i in range(10, 20, impf_idx):
TypeError: 'list' object cannot be interpreted as an integer
The variable impf_idx is a list and hence your code is giving error. The last parameter in range() should be an integer.
Change
to
for i in range(10, 20, len(impf_idx)):
to fix the error.