Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

[QUESTION] How to modify large dataframe >inplace< #102

Open
Zuckerbrot opened this issue Dec 8, 2019 · 2 comments
Open

[QUESTION] How to modify large dataframe >inplace< #102

Zuckerbrot opened this issue Dec 8, 2019 · 2 comments
Assignees
Labels

Comments

@Zuckerbrot
Copy link

Hi,
firstly thanks for this great library.
I am wondering if there is a way to modify rows inplace.
Each time using
df.setRow(1, row => row.set("y", 33))
to set column "y" in row 1 to value 33
a new dataframe object is created.

Is there a way to avoid this and directly modify the existing object?

Thanks!

@Gmousse
Copy link
Owner

Gmousse commented Apr 11, 2020

Hi @Zuckerbrot,
Indeed, the current usage doesn't allow direct mutation or property modification.
I must look if it's possible to implement it easily.

@Gmousse
Copy link
Owner

Gmousse commented Apr 11, 2020

Hi again,

I have added a new method DataFrame.setRowInPlace (with the same usage) mutating directly the existing DataFrame on the develop branch (you can switch on it to test).

I will look to add other usage like this.

@Gmousse Gmousse self-assigned this Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants