Hello everyone,
I would like to add a column to my spark data frame that stores which line in its particular group it is.
for example:
Dataset = 'countries' containing (France, France, France, US, France, US, China)
if I do countries %>% group_by(country) %>% mutate( .... )
As a result of these operations I want for example this as output:
China 1
France 1
France 2
France 3
France 4
US 1
US 2
Does anyone know how to implement this?
kind regards,
Charles