When I use Series.reset_index()
my variable turns into a DataFrame
object. Is there any way to reset the index of a series without incurring this result?
The context is a simulation of random choices based on probability (monte carlo sim), where selections made from series are omitted with series.pop(item)
.
I require the index reset because I iterate through in order to create a cumulative frequency series.
series
to itself i.e.f = f.reset_index(drop=True, inplace=True)
– Runge