-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pandas insert should use index=False
to prevent extra index
field generation
#666
Comments
conversation snippet:
|
Will you please describe the scenario in a bit more detail? When is the bothersome extra index field generated? And why is it a problem? |
the below illustrates what this hopes to work but results in a KeyError with 'unknown column index', this should be fixed in some manner which does not break I don't know 100% all of the situations where index is generated (not so familiar with Pandas here), it's a problem because we claim to support pandas insert and dealing with correct indexes will likely be a common scenario, it would be best if we could transparently strip any notion of index and still allow pandas insert.
|
todo: reconfirm, report back |
confirmed still valid. will adjust per comments above, ensure pandas test coverage for this case |
Currently running with:
would be good to get more pandas user confirmation if this makes sense... also probably needs xcheck on composite keys.. for single-key example (see attached), user created frames without explicit index get range index, which then can be 'dropped' on reset index, allowing to_records to work with index false. dj created records will not have the range index, so it is reset and then dropped within the to_records call see attached for test/interaction example (rename to .py. if needed) |
index=False
to prevent extra index
field generationindex=False
to prevent extra index
field generation
datajoint/table.py: smarter dataframe conversion (#666)
Fixed with #776 |
No description provided.
The text was updated successfully, but these errors were encountered: