-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow nested field names to be escaped with backticks. #177
Conversation
This allows dots, spaces, and more, while still permitting the dot to function as a path separator.
It's the only class that uses it, so make it private. Also allows it to make the complicated check for whether _aliases is present.
This will cut down on the number of times that aliases are computed.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 99.40% 99.43% +0.02%
==========================================
Files 13 13
Lines 1016 1062 +46
==========================================
+ Hits 1010 1056 +46
Misses 6 6 ☔ View full report in Codecov by Sentry. |
Click here to view all benchmarks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thank you
Change Description
Extends the support of the Pandas backtick convention in
eval
andquery
to support nested column and field names. Because the "." operator is used as a path separator inNestedFrame.__setitem__
andNestedFrame.__getitem__
, this same convention is followed within those methods to allow users to work around cases when the column name unavoidably contains spaces or dots itself. This context is not a full evaluation context, but whenNestedFrame
is performing an evaluation, and prepares aliases, these are reused in order to avoid recomputing them.While this also lays the foundation for supporting more than one level of nesting, this PR does not enable any more than one level of nesting, and continues to follow existing conventions in this case. It does allow users to work with column names having any number of dots or spaces in them by employing backticks.
Closes #176 .
Solution Description
Code Quality
Project-Specific Pull Request Checklists
New Feature Checklist