Pandas expand rows from list data available in column
DataFrame.explode Since pandas >= 0.25.0 we have the explode method for this, which expands a list to a row for each element and repeats the rest of the columns: df.explode(‘column1’).reset_index(drop=True) Output column1 column2 0 a 1 1 b 1 2 c 1 3 d 2 4 e 2 5 f 2 6 g 3 7 … Read more