'is it possible to explode a pandas dataframe inplace?

From the pandas.DataFrame.explode docs it doesn't look like it.

Still, any chance there's some clever way to achieve this?

Context: I have an object that gets initialized with a dataframe, and I'd like to manipulate it in place such that the scope above the object will keep access to the resulting dataframe without polling the object.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source