Python Forum
Code improvement: groupby and operation on conditionals
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code improvement: groupby and operation on conditionals
#3
Thank you! This is fantastic. Yes, changing the way the data is structured makes this much better to interact with.

If I can ask a followup question: the data is in an existing dataframe. Is there a good way to format it to those four column structures from a dataframe? From some initial digging, it looks like one approach may be to create a MultiIndex of all the compounds and flags and then stack the data. Does that sound like a good/best method to investigate?
Reply


Messages In This Thread
RE: Code improvement: groupby and operation on conditionals - by pythonidae - Dec-07-2019, 05:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pandas change row value an existing column with conditionals Gigux 1 3,003 Jun-22-2019, 08:04 PM
Last Post: Gigux
  Genetic Algorithm improvement Alberto 0 4,329 Oct-19-2017, 02:13 PM
Last Post: Alberto

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020