pydata/pandas — Issue #782: Buglet in Dataframe.append with no index
Author: adamklein
Created: 2012-02-15 16:06:14+00:00
State: open
Labels: Bug, prio-medium

This works as expected:

df = DataFrame(index=[0], columns=['A', 'B', 'C'])
df3 = DataFrame(index=[1, 2], columns=['A', 'B'])
df5 = df.append(df3)

expected = DataFrame({'A': [nan, nan, nan],
'B': [nan, nan, nan],
'C': [nan, nan, nan]})

This doesn't:

df = DataFrame(columns=['A', 'B', 'C'])
df3 = DataFrame(index=[0, 1], columns=['A', 'B'])
df5 = df.append(df3)

expected = DataFrame({'A': [nan, nan],
'B': [nan, nan],
'C': [nan, nan]})