Skip to content
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

Support Append data (new row) to a Series and/or DataFrame #73

Closed
pjebs opened this issue Aug 27, 2018 · 6 comments · May be fixed by #109
Closed

Support Append data (new row) to a Series and/or DataFrame #73

pjebs opened this issue Aug 27, 2018 · 6 comments · May be fixed by #109

Comments

@pjebs
Copy link

pjebs commented Aug 27, 2018

I can see that func (s *Series) Append(values interface{}) can be used to append data to the end of the Series.

How can I insert a new row at an arbitrary position?

It would be great to be able to do it for a DataFrame too. Not just for a Series.

@pjebs
Copy link
Author

pjebs commented Aug 27, 2018

func (df DataFrame) Set(indexes series.Indexes, newvalues DataFrame) DataFrame seems to update existing rows at an arbitrary position.

@pjebs
Copy link
Author

pjebs commented Aug 27, 2018

#69 (comment) shows how to append. If you want to insert at arbitrary position, then you have to use the sort function which is slow and creates a copy of the DataFrame.

@pjebs
Copy link
Author

pjebs commented Oct 7, 2018

I think it should operate like this package: https://github.com/rocketlaunchr/dataframe-go

@mannharleen
Copy link

mannharleen commented Jan 5, 2020

@pjebs I ve created a PR with the relevant changes that would implement an insert at arbitrary position. Happy for feedback. If in doubt, checkout the tests for usage

@pjebs pjebs closed this as completed Jan 5, 2020
@mannharleen
Copy link

Any specific reason for closing this issue?

@pjebs
Copy link
Author

pjebs commented Jan 6, 2020

I created my own package: https://github.com/rocketlaunchr/dataframe-go
I consider this package to be for all intents and purposes unmaintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants