-
Notifications
You must be signed in to change notification settings - Fork 358
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
Fix DataFrame.merge to work properly #2060
Conversation
FYI: I believe the issue introduced in #2055 should also resolved with this change. >>> kdf=ks.DataFrame({'transport_order_number': {11059585: ('696530708053'), 36538499: '696530708053', 41914814: '696530708053', 58878846: '696530708053', 83502171: '696530708053', 87335732: '696530708053', 89651819: '696530708053'},
... 'event_description': {11059585: 'PIEZA EN RUTA AL DESTINATARIO', 36538499: 'TRANSFERENCIA RUTA (OTBCS)', 41914814: 'RECEPCION TRANS. PIEZA', 58878846: 'RETIRO DESDE PDT', 83502171: 'RECEPCION TRANS. CONT.', 87335732: 'RECEPCIONADA', 89651819: 'PIEZA ENTREGADA A DESTINATARIO'},
... 'event_date': {11059585: ('2020-12-15 09:05:12.743000'), 36538499: ('2020-12-15 06:42:22.477000'), 41914814: ('2020-12-15 06:42:34.083000'), 58878846: ('2020-12-14 13:41:00'), 83502171: ('2020-12-15 06:42:00'), 87335732: ('2020-12-14 14:41:00'),
... 89651819: ('2020-12-15 12:53:00')}})
>>> recepcion=kdf.loc[kdf['event_description']=='RECEPCIONADA']
>>> retiro=kdf.loc[kdf['event_description']=='RETIRO DESDE PDT']
>>> ks.merge(recepcion, retiro, on='transport_order_number', how='outer', suffixes=('_recepcion','_retiro'))
transport_order_number event_description_recepcion event_date_recepcion event_description_retiro event_date_retiro
0 696530708053 RECEPCIONADA 2020-12-14 14:41:00 RETIRO DESDE PDT 2020-12-14 13:41:00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except for two nits.
Thanks for the review, @ueshin |
Codecov Report
@@ Coverage Diff @@
## master #2060 +/- ##
=======================================
Coverage 94.74% 94.75%
=======================================
Files 54 54
Lines 11675 11683 +8
=======================================
+ Hits 11062 11070 +8
Misses 613 613
Continue to review full report at Codecov.
|
Thanks! merging. |
This should resolve #2055
Before:
After: