pandas.DataFrame.explode — pandas 1.3.5 documentation
pandas.pydata.org › pandasSeries.explode. Explode a DataFrame from list-like columns to long format. Notes. This routine will explode list-likes including lists, tuples, sets, Series, and np.ndarray. The result dtype of the subset rows will be object. Scalars will be returned unchanged, and empty list-likes will result in a np.nan for that row.
Pandas explode(): Convert list-like column elements to ...
cmdlinetips.com › 2020 › 06Jun 28, 2020 · Pandas explode() to separate list elements into separate rows() Now that we have column with list as elements, we can use Pandas explode() function on it. Pandas explode() function will split the list by each element and create a new row for each of them. In this example, each book name goes to a separate row and it also copies other columns for each element.