After trying many different techniques like np.where(), .replace() and pivot methods the result doesn't match as per the below test case. What is missing here? Is there any simpler solution to resolve such problems ?
employee_id date Login Logout
1 3/1/2018 9:00:00 10:11:00
1 3/1/2018 12:30:00
1 3/1/2018 13:00:00 15:00:00
1 3/1/2018 16:00:00
1 3/2/2018 9:50:00
1 3/2/2018 10:30:00
1 3/2/2018 13:00:00 16:10:00
Read more here: https://stackoverflow.com/questions/66266446/how-to-convert-boolean-value-of-a-column-to-other-column-value-row-wise-in-a-d
Content Attribution
This content was originally published by gk_stack at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.