I have a dataframe with the structure
name code
Big J 323
Big J 323
Big J 323
Big J Online 323
Big J Online 323
Big J Online 323
Code Base 476
Code Base 476
Sometimes there are duplicates that contain online. In this situation, I want to keep all of the online versions and remove the offline versions. If there is no online version, I want to keep the offline version.
The result would be
Big J Online 323
Big J Online 323
Big J Online 323
Code Base 476
Code Base 476
Is there an efficient way to filter this out?