I want to know what are the unique values in a column given a value from another column, for exmple, I have the following data frame:
| name | category |
|---|---|
| A | Pr |
| A | Pr |
| B | Pr |
| A | N |
| B | N |
The result should be like this:
| A | B | |
|---|---|---|
| Pr | 2 | 1 |
| N | 1 | 1 |
I want to know what are the unique values in a column given a value from another column, for exmple, I have the following data frame:
| name | category |
|---|---|
| A | Pr |
| A | Pr |
| B | Pr |
| A | N |
| B | N |
The result should be like this:
| A | B | |
|---|---|---|
| Pr | 2 | 1 |
| N | 1 | 1 |