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
Describe the bug
When creating a DataFrame by providing an Object, if one of the columns is called 'index,' then 'df.indexwill point to that column instead of the actualDataFrame` index. This caused very hard-to-decipher errors when I was working with a table I did not know contained such a column.
To Reproduce
let obj = {
foo: [1,2,3,4,5],
bar: [5,6,7,8,9],
index: ['a','b','c','d','e']
}
df = new DataFrame(obj).setIndex('foo')
df.index.includes(1) //Throws error
Expected behavior df.index should give the index of df. Failing that, a warning that I've created a DataFrame with a column named index.
The text was updated successfully, but these errors were encountered:
Yes, I can confirm that creating a DataFrame with a column named 'index', or adding a column named 'index', breaks the DataFrame (prints nothing, does not seem to have any rows)
Describe the bug
When creating a
DataFrame
by providing anObject
, if one of the columns is called 'index,' then 'df.indexwill point to that column instead of the actual
DataFrame` index. This caused very hard-to-decipher errors when I was working with a table I did not know contained such a column.To Reproduce
Expected behavior
df.index
should give the index ofdf
. Failing that, a warning that I've created aDataFrame
with a column named index.The text was updated successfully, but these errors were encountered: