Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2021 10:04 AM
I have a dataframe with the following columns:
- Key1
- Key2
- Y_N_Col
- Col1
- Col2
For the key tuple (Key1, Key2), I have rows with Y_N_Col = "Y" and Y_N_Col = "N".
I need a new dataframe with all rows with Y_N_Col = "Y" (regardless of the key tuple), plus all Y_N_Col = "N" for which there are no Y_N_Col = "Y" for the same key tuple.
The dataframe is already calculated in a Scala notebook.
Thanks in advance,
Tiago R.
Labels:
- Labels:
-
Dataframe
-
Scala
-
Scala notebook