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
Would it be possible to add a reshape style method to the Series object?
Currently if you need to flatten a series, for instance to perform factorization, there is no native way of reshaping the resulting series' spatial dimensions to that of the original series.
A workaround involves calling np.reshape with a concatenated tuple for the dimensions, for example,
w_reshape=np.reshape(w, ts.shape[:2] +w.shape[1])
However, if the series w is on Spark this appears to collect w before reshaping, and also returns an Numpy array which requires an extra step to make w a series again.
The text was updated successfully, but these errors were encountered:
Would it be possible to add a
reshape
style method to the Series object?Currently if you need to flatten a series, for instance to perform factorization, there is no native way of reshaping the resulting series' spatial dimensions to that of the original series.
A workaround involves calling
np.reshape
with a concatenated tuple for the dimensions, for example,However, if the series
w
is on Spark this appears to collectw
before reshaping, and also returns an Numpy array which requires an extra step to makew
a series again.The text was updated successfully, but these errors were encountered: