Skip to content

Random improvements. - #150

Merged
gsaluja9 merged 2 commits into
developfrom
misc_improvements
Oct 14, 2022
Merged

gsaluja9 merged 2 commits into
developfrom
misc_improvements

Conversation

@gsaluja9

Copy link
Copy Markdown
Contributor

When error returned from query was a dict, it was not getting handled.

When error returned from query was a dict, it was not getting handled.
self.src_key = self.header[1].split("@")[1]
self.dst_class = self.header[2].split("@")[0]
self.dst_key = self.header[2].split("@")[1]
# Pandas appends a .n to the column name if there is a duplicate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what is happening here?

To me it sounds like doing this could possible obscure a mistake on a user's part in creating a csv

@gsaluja9 gsaluja9 Oct 13, 2022 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah i see. So, let's say you are trying to connect "Persons", who are friends, based on their uids, the csv would have 2 headers which read the same, i.e Person@uid and Person@uid.

when pandas reads this csv, to avoid this conflict, it implicitly renames conflicting columns as col.0, col.1,col.2 ....

That breaks the queries we make.
It will not be a mistake, but something a user might want to do, genuinely.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nice, hadn't thought of that

@gsaluja9
gsaluja9 requested a review from drewaogle October 13, 2022 17:29
@gsaluja9
gsaluja9 merged commit fc5aecc into develop Oct 14, 2022
@gsaluja9
gsaluja9 deleted the misc_improvements branch September 14, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants