3 ms·
Everyone except me seems to have gotten access to Codex :) Can someone who has access try asking it to do this with Python/Pandas: I have a data frame with co
by d4rkp4ttern 5y ago
Everyone except me seems to have gotten access to Codex :)
Can someone who has access try asking it to do this with Python/Pandas:
I have a data frame with columns [name, date, win] which is sorted by date in increasing order within each name. The win column is Boolean. Now add a new column “days_to_win” which is the number of days until the NEXT win=True for the name, not counting the current date. If there is no next win for the name, set it to 9999.
This should be done without any for loops with pure pandas functions/methods.
I will be impressed if Codex can do this.