Skip to content

ENH: allow axis argument to append / move append code to generic.py #8295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jreback opened this issue Sep 17, 2014 · 5 comments
Closed

ENH: allow axis argument to append / move append code to generic.py #8295

jreback opened this issue Sep 17, 2014 · 5 comments
Labels
API Design good first issue Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@jreback
Copy link
Contributor

jreback commented Sep 17, 2014

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)

@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode API Design labels Sep 17, 2014
@jreback jreback added this to the 0.16 milestone Sep 17, 2014
@htkm
Copy link

htkm commented Sep 17, 2014

I would like to take this into a PR, but I wonder which file would be the best to put a test case.

@jreback
Copy link
Contributor Author

jreback commented Sep 17, 2014

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!

@htkm
Copy link

htkm commented Sep 17, 2014

Thank you for the information !

@jreback
Copy link
Contributor Author

jreback commented Sep 17, 2014

lmk how it goes! and if you need help.

@jreback jreback changed the title ENH: allow axis argument to append ENH: allow axis argument to append / move append code to generic.py Sep 17, 2014
@jreback jreback modified the milestones: 0.15.1, 0.16 Sep 23, 2014
@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@TomAugspurger
Copy link
Contributor

Closing.

This would have confusing performance implications, as appending to the columns is cheap, but appending to rows is expensive.

@TomAugspurger TomAugspurger modified the milestones: Contributions Welcome, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design good first issue Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants