I have a pandas framework with multiple columns. Then I pull out df [reason] and get a series
some text 1 0.1178 Other string 0.0732 another string 0.0534 Name: reason, dtype: float64
What I would like to convert to this is a dataframe for what looks like this:
some text 1 Other string another string some text 1 0.1178 0 0 Other string text 0 0.0732 0 another string here 0 0 0.0534
How to duplicate rows as columns and fill in inappropriate rows / columns with 0?
source share