-
Notifications
You must be signed in to change notification settings - Fork 91
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
use default delimiter to flatten columns #330
Conversation
Deploying datachain-documentation with Cloudflare Pages
|
Probably not the right way to do this, tbh. I'll change it back (and replace |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #330 +/- ##
==========================================
- Coverage 86.94% 86.88% -0.07%
==========================================
Files 90 90
Lines 9898 9896 -2
Branches 1995 1994 -1
==========================================
- Hits 8606 8598 -8
- Misses 944 949 +5
- Partials 348 349 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
columns = [] | ||
if headers: | ||
columns = [".".join(filter(None, header)) for header in headers] | ||
return pd.DataFrame.from_records(self.to_records(), columns=columns) |
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.
So the problem was this line (passing data as a dict and then assigning different column names)? Is the rest refactoring? Just want to make sure I understand the bug and the fix.
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.
yes!
Fixes #328
to_pandas(flatten=True)
now returns columns in the same way asto_records
and in the same way we store them in the DB (to fix the bug and for consistency)changing this use
.
. It is simpler for end users and we don't want them to see DB details (at least it's not how our API operates atm).