arquero
arquero copied to clipboard
question: rename silently gets rid of column, is this expected behavior?
Start w a simple 2-col arquero table:
my_tab=aq.table({col1:[1,2,3],col2:[4,5,6]})
then do the following rename:
my_tab.rename({col1:'col2'})
the above replaces col1 by the contents of col2, so the rename operation will effectively delete a column. this could be undesirable from a logical standpoint.
perhaps a warning should be issued so this at least is not silent.
Assigning to an existing column overwrites it by design. At minimum we should double check to ensure this is clearly stated in the documentation. Alternatively, we could consider throwing an error if we want to enforce that no deletions may occur.
Thanks for your prompt response! Either way would be better than silent deletion.
On Fri, Jun 4, 2021 at 7:36 PM Jeffrey Heer @.***> wrote:
Assigning to an existing column overwrites it by design. At minimum we should double check to ensure this is clearly stated in the documentation. Alternatively, we could consider throwing an error if we want to enforce that no deletions may occur.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/uwdata/arquero/issues/202#issuecomment-855059256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD32VFS4X3PYPCFS76LXD3TTRFIPDANCNFSM46DS3QVQ .