Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running error #2

Open
Yan-echo opened this issue May 27, 2019 · 1 comment
Open

running error #2

Yan-echo opened this issue May 27, 2019 · 1 comment

Comments

@Yan-echo
Copy link

features = random.sample(dataSet.columns.values[:-1], int(math.sqrt(m - 1)))
TypeError: Population must be a sequence or set. For dicts, use list(d).
What should I do? Thank you.

@zhaoxingfeng
Copy link
Owner

zhaoxingfeng commented Jun 7, 2019

The code is written by python2.7, for python3 replace by
features = random.sample(df.columns.values[:-1].tolist(), int(math.sqrt(m - 1)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants