I have the following Dataframe:
| ID | Payment | Value | Date |
|---|---|---|---|
| 1 | Cash | 200 | 2020-01-01 |
| 1 | Credit Card | 500 | 2020-01-06 |
| 2 | Cash | 300 | 2020-02-01 |
| 3 | Credit Card | 400 | 2020-02-02 |
| 3 | Credit Card | 500 | 2020-01-03 |
| 3 | Cash | 200 | 2020-01-04 |
What I'd like to do is to count how many ID's have used both Cash and Credit Card.
For example, in this case there would be 2 ID's that used both Cash and Credit Card.
How would I do that on PySpark?