0

I'm confronting with a data-set where every single booking(status: 1) and cancellation(status: -1) is written:

Day Etage   Table   ID  Status

1   1   A   ABE 1

1   1   A   ABE -1

1   1   A   SSH 1

.
.
.

2   2   C   DRO 1

2   3   A   AMO 1

2   3   B   LOR 1

2   3   B   LOR -1

Since I should only analyse the "real" bookings I'm searching a efficient way to filter these booked and cancelled IDs, for instance for Table A on Etage 1 at Day 1: SSH should be kept and ABE should be deleted

Can anyone help? I would appreciate any suggest better than my for-loop-ception-approach right now :p

NicE
  • 21,165
  • 3
  • 51
  • 68
97m423
  • 11
  • 4
  • 1
    It is not clear to me how do you want to retain row and conversely what rows do you want to delete. Example, you stated that `SSH` in column `Table` has to be retained while `ABE` should be deleted. My question is: all `SSH`s should be retained and/or all `ABE`s should be kept? if so, what about other columns, there are other parameters in other columns to filter on? – SabDeM Aug 03 '15 at 14:49
  • Sorry about that bad explanation. Let me try again: We know that a table can be booked multiple times but at the end of the day, a table (actually a Day-Etage-Table combination) can only given to one person (ID), so in this example ABE (as well LOR) should be deleted and SSH (as well DRO and AMO) should be kept – 97m423 Aug 14 '15 at 09:07

0 Answers0