I realize Dataframe takes a map of {\'series_name\':Series(data, index)}. However, it automatically sorts that map even if the map is an OrderedDict().
Is there a simpl
You could use pandas.concat
:
import pandas as pd
from pandas.util.testing import rands
data = [pd.Series([rands(4) for j in range(6)],
index=pd.date_range('1/1/2000', periods=6),
name='col'+str(i)) for i in range(4)]
df = pd.concat(data, axis=1, keys=[s.name for s in data])
print(df)
yields
col0 col1 col2 col3
2000-01-01 GqcN Lwlj Km7b XfaA
2000-01-02 lhNC nlSm jCYu XLVb
2000-01-03 sSRz PFby C1o5 0BJe
2000-01-04 khZb Ny9p crUY LNmc
2000-01-05 hmLp 4rVp xF2P OmD9
2000-01-06 giah psQb T5RJ oLSh