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

Clean run_models.py #224

Open
nanounanue opened this issue Jun 26, 2017 · 0 comments
Open

Clean run_models.py #224

nanounanue opened this issue Jun 26, 2017 · 0 comments
Assignees

Comments

@nanounanue
Copy link
Contributor

I am just pasting two pending review request from PR #223

(NOTE: Both requests are for run_models.py lines 457-460)

  1. I think is a better idea not to hard code the number of individual features, maybe we chould add this as an argument to the method, so, the code will be:
result = pd.DataFrame(columns=['risk_%i'%i for i in range(1, num_of_individual_features + 1)])
  1. You don't need to concatenate (is not the recommended way of doing this), you could create a list of tuples and then creating the pandas DataFrame (and you could remove the previous comment... but this needs more careful thinking, so you could leave this code here in this version.

For reference see: https://stackoverflow.com/questions/28056171/how-to-build-and-fill-pandas-dataframe-from-for-loop

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

No branches or pull requests

2 participants