I have a pandas series values, stored in variable s, which was formed using Multi Indexing. Code-
s = pd.Series(np.random.rand(50), index=idx)
Here is how s looks like-
What is the best way to create a dataframe of this?
CodePudding user response:
Instead of series you can use dataframe and input your own multi index list.
s = pd.DataFrame(np.random.rand(50), index=idx)