Python threading error - must be an iterable, not int

前端 未结 1 435
轮回少年
轮回少年 2020-12-16 01:08

I\'m trying to calculate rolling r-squared of regression among first column and other columns in a dataframe (first column and second, first column and third etc.) But when

相关标签:
1条回答
  • 2020-12-16 01:43

    threading.Thread class needs an iterable of arguments as the args parameter. You're passing args=(threadnum) which is a single int object, you need to pass some iterable object that would allow multiple args, even when you only want to pass one arg.

    args=[threadnum] would work, because that makes a list which is iterable.

    0 讨论(0)
提交回复
热议问题