You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to mimic the pivot_wider function in R:
wide %>% pivot_wider(names_from = cname, values_from = c(val1,val2))
=== === === ========== ========== ========== ==========
x a b val1_c val1_d val2_c val2_d
=== === === ========== ========== ========== ==========
1 2 3 1.0174232 NA -0.6611959 NA
2 3 4 0.6590795 NA -2.0954505 NA
3 4 5 1.2939581 NA 1.6350356 NA
4 5 6 -1.9395356 NA 0.7813238 NA
5 6 7 0.3558087 NA 0.9789414 NA
6 7 8 0.9859100 NA -0.9803336 NA
7 8 9 NA 0.4949224 NA -0.0659333
8 9 10 NA 0.5024755 NA -0.2317832
9 10 11 NA 1.6926897 NA -0.3840687
10 11 12 NA -0.4324705 NA -0.0901276
11 12 13 NA -0.6415260 NA 0.0014151
12 13 14 NA 1.2406868 NA -2.1959740
=== === === ========== ========== ========== ==========
unstack seems similar but I could not get it to work.
I was trying
unstack(wide, [:x, :a,:b], :cname, [:val1,:val2])
It seems that this functionality is not implemented in unstack. It would be nice to have features similar to pivot_longer and pivot_wider in R dplyr package if that fits into this package design philosophy.
The text was updated successfully, but these errors were encountered:
Hi, I am trying to perform a long to wide transformation of a data frame in Julia. The original data frame I have is:
I am trying to mimic the pivot_wider function in R:
unstack seems similar but I could not get it to work.
I was trying
It seems that this functionality is not implemented in
unstack
. It would be nice to have features similar to pivot_longer and pivot_wider in R dplyr package if that fits into this package design philosophy.The text was updated successfully, but these errors were encountered: