http://stackoverflow.com/questions/25896241/creating-columns-dynamically-assigning-them-a-constant-row-vector/25896504#25896504
e.g.
Instead of
pd.concat([df,DataFrame([[1,2,3,4]],columns=list('ABCD'),index=df.index)],axis=1)
allow as a convience feature
df.append(DataFrame([[1,2,3,4]],columns=list('ABCD'),index=df.index),axis=1)
Comment From: htkm
I would like to take this into a PR, but I wonder which file would be the best to put a test case.
Comment From: jreback
ok so right now Series
and DataFrame
support append, so prob want to move both of these codes into core/generic.py
. and can move any tests that currently exist from test_series/test_frame
(might be more tests lurking....see if you can find any) into test_generic.py
I don't think Panel support append ATM (so can raise NotIMplementedError
if ndim > 2 for now).
prob a bit more involved now!
Comment From: htkm
Thank you for the information !
Comment From: jreback
lmk how it goes! and if you need help.
Comment From: TomAugspurger
Closing.
This would have confusing performance implications, as appending to the columns is cheap, but appending to rows is expensive.