I have two ndarrays of size (m x n), and two lists of length m and n respectively. I want to convert the two matrices to a dataframe with four columns. The first two columns correspond to the m and n dimensions, and contain the values from the lists. The next two columns should contain the values from the two
Tag: unpivot
Pandas ‘partial melt’ or ‘group melt’
I have a DataFrame like this and I want to transform it into something like this This is an unpivot / melt problem, but I don’t know of any way to melt by keeping these groups intact. I know I can create projections across the original dataframe and then concat those but I’m wondering if I’m missing some common melt