I have a following data frame,
df1=
mac gw_mac ibeaconMajor ibeaconMinor
ac233f264920 ac233fc015f6 [1, 0, 1] [1, 0]
ac233f26492b ac233fc015f6 [0, 0, 0] [0, 0]
ac233f264933 ac233fc015f6 [0, 1, 1] [0, 2]
If all the values in a list(from the columns "ibeaconMajor" & "ibeaconMinor") is "0" it should return as "0" or else it should return frequently occurred non-zero values from a list as like below,
df1=
mac gw_mac ibeaconMajor ibeaconMinor
ac233f264920 ac233fc015f6 1 1
ac233f26492b ac233fc015f6 0 0
ac233f264933 ac233fc015f6 1 2