Closed pjebs closed 4 years ago
func (df DataFrame) Set(indexes series.Indexes, newvalues DataFrame) DataFrame
seems to update existing rows at an arbitrary position.
https://github.com/kniren/gota/issues/69#issuecomment-398107918 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
.
I think it should operate like this package: https://github.com/rocketlaunchr/dataframe-go
@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
Any specific reason for closing this issue?
I created my own package: https://github.com/rocketlaunchr/dataframe-go I consider this package to be for all intents and purposes unmaintained.
I can see that
func (s *Series) Append(values interface{})
can be used to append data to the end of theSeries
.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 aSeries
.