Skip to main content
Patthebug's user avatar
Patthebug's user avatar
Patthebug's user avatar
Patthebug
  • Member for 8 years, 5 months
  • Last seen more than 3 years ago
awarded
awarded
revised
Loading…
revised
Loading…
revised
Loading…
revised
Loading…
Loading…
awarded
comment
Listing page visits for each visitor
Thanks so much. I updated my code as per your recommendation. It is still going on for an hour or so. Guess I will just have to wait for it to finish, but I'm sure it's better than my method.
accepted
awarded
comment
Listing page visits for each visitor
@Graipher: Added the imports
revised
Listing page visits for each visitor
added 76 characters in body
Loading…
revised
Listing page visits for each visitor
deleted 27 characters in body
Loading…
asked
Loading…
comment
Code for creating combinations taking a long time to finish
@MathiasEttingerI tried that earlier. But the generate_combination_of_questions(IncorrectQuestions) is the part that hogs up the RAM, and I think understandably so, because it is working on the entire dataframe with all the memberid values. Because of this reason itself, I moved to the code I had pasted.
comment
Code for creating combinations taking a long time to finish
Here's what I finally wrote: for memberid in IncorrectQuestions['memberid'].unique(): for pair in generate_combination_of_questions(IncorrectQuestions[Incorre‌​ctQuestions['memberi‌​d']==memberid]): writer.writerow(pair)
awarded
awarded