Transposing in dplyr

I think you want tidyr rather than dplyr: Using this, you can specify your groupings – and you can add on select(-group) to remove them later.

Transposing a 1D NumPy array

It’s working exactly as it’s supposed to. The transpose of a 1D array is still a 1D array! (If you’re used to matlab, it fundamentally doesn’t have a concept of a 1D array. Matlab’s “1D” arrays are 2D.) If you want to turn your 1D vector into a 2D array and then transpose it, just slice it with np.newaxis (or None, they’re … Read more