I generated a unique value based from a column but what I want to get as a result is the transmuted value from a different column. Here's the code for your reference:
x = [[123, "M"],
[321, "F"],
[456, "M"],
[678, "F"],
[654, "M"],
[123, "M"],
[678, "F"],
[678, "F"],
]
x = pd.DataFrame(x, columns = ["ID", "GENDER"])
Getting the unique value
[in]: x["ID"].unique()
[out]: array([123, 321, 456, 678, 654], dtype=int64)
Expected Result:
[out]: ["M", "F", "M", "F", "M"]