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
DataFrame assignments behave in a surprising way then numerical indexes are used: instead of the vector replacing the old one, they are added to the dataframe. This is in contrast with what happen when explicit names are used.
DataFrame assignments behave in a surprising way then numerical indexes are used: instead of the vector replacing the old one, they are added to the dataframe. This is in contrast with what happen when explicit names are used.
Take for example this dataframe:
Assigning
df[0]
will add a new vector to the dataframe instead of replacing the 0th column:This is surprising, considered that assigning to
df[:a]
replaces the:a
column as expected:and that
df[:a]
anddf[0]
both return the same vectorThe text was updated successfully, but these errors were encountered: