gramener / gramex

A visual analytics platform to build data-based web apps with less code.
https://gramener.com/gramex/guide/
Other
142 stars 56 forks source link

Cannot update multiple rows with gramex.data.update #312

Open jaidevd opened 3 years ago

jaidevd commented 3 years ago

Is something not working as expected? gramex.data.update does not parse args correctly.

Steps to reproduce. Suppose there's a file.csv containing:

id, val
1, x
2, y
3, z

then the following:

gramex.data.update('file.csv', id="id", args={'id': [2, 3], 'val': ['a', 'b']})

converts it into:

id, val
1, x
2, a
3, a

Expected behavior It should update rows 2 and 3 to a and b respectively.

Your environment:

sanand0 commented 3 years ago

I'll explore this. I forgot what the intended behavior is, but the update should be able to change multiple rows as described.

Will plan for the Nov release.

sanand0 commented 3 years ago

This feature has slipped by a month and will be planned for the January release

sanand0 commented 3 years ago

I am still behind on this feature, and it's at risk for 1.67.

jaidevd commented 2 years ago

@sanand0 @bhatsandeep When are we planning to fix this? This is blocking https://gramenertech.atlassian.net/browse/GRAMEX-15

Specifically, from the user management component of the admin2 app, editing attributes of multiple users at a time doesn't work.The last value overwrites the whole table.

sanand0 commented 2 years ago

@jaidevd -- the places to change are in data.py

Could you see if you could send a PR?