You can use the melt function to reverse a pivot operation and go from a wide-form DataFrame back to a long-form DataFrame.