-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
update Bars example to demo dataframe constructor #4656
Conversation
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
"nbformat_minor": 4 |
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.
Please strip out the metadata, using something like strip_kernel
:
#!/bin/bash
cp "$1" /tmp/
/usr/local/bin/jq --indent 1 \
'
(.cells[] | select(has("outputs")) | .outputs) = []
| (.cells[] | select(has("execution_count")) | .execution_count) = null
| .metadata = {"language_info": {"name":"python", "pygments_lexer": "ipython3"}}
| .cells[].metadata = {}
' "$1" > /tmp/stripped.ipynb
cat /tmp/stripped.ipynb > "$1"
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.
Your snippet doesn't actually address the nbformat
. Should both of those be removed completely?
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.
That's fine to leave; it needs to have some value, and whether that's 4.2 or 4.4 shouldn't matter.
Thanks @kcpevey! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Updates the Bars example to demo dataframe constructor
I've struggled with creating Bars plots in the past. For this example, it turns out it was really easy to switch to dataframes. I thought it would be a better upgrade, but I'll submit it anyway.
I'm not sure what aspect I struggled with before (maybe I missed the aggregate step?). If I can get a better reproducible example, I'll create a new PR.