-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Description
In the version 9.1, when we are concatenating pandas.Series, we would expect the columns name of the created DataFrame to be the ones of the Series which were concatenated together. Nevertheless the series' names are lost, and the columns are simply 0, 1, 2 ...
Error shown below:
pd.__version__
Out[14]: '0.9.1rc1'
s1 = pd.TimeSeries(randn(5), index=pd.date_range('01-Jan-2013', periods=5, freq='D'), name='A')
s2 = pd.TimeSeries(randn(5), index=pd.date_range('01-Jan-2013', periods=5, freq='D'), name='B')
series = [s1, s2]
pd.concat(series, axis=1)
_32.columns = map(lambda s: s.name, series)
_32