You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DataFrame's get accessor throws exception after column values replaced via set (using Series) #508
Describe the bug
Unable to access DataFrame columns with get (e.g., df['foo']) after using set to replace an existing column. Attempts to access via get throw the following exception (from the Chrome browser):
Uncaught Error: File format not supported! startup:4
at t.e (startup:4:47)
at new t (startup:4:47)
at t.$getColumnData (startup:4:47)
at t.get (startup:4:47)
at <anonymous>:1:17
To Reproduce:
In the browser interactive console:
let df = new dfd.DataFrame([{'foo': 'bar'}]);
let ds_foo = df['foo'];
ds_foo.apply(val => val + '2', { inplace: true });
df['foo'] = ds_foo; // <- this seems to work as data in the foo column appears updated in the browser interactive console
let ds_foo2 = df['foo']; // <- but column can no longer be retrieved using the DataFrame's get accessor
Note that use of the column() method yields identical behavior.
Expected behavior
Return of the Series object containing 'foo' column values when let ds_foo2 = df['foo'] is executed.
Additional context
Observed behavior was consistent across all tested browsers (Firefox, Chrome, Brave). Inspecting df after df['foo'] = ds_foo reveals that the column values are updated as expected:
Activity
jm-boley commentedon Oct 4, 2022
Please note that as an alternative the
addColumn()method does appear to work:junduck commentedon Nov 12, 2025
#681 Should fix this.