Improve pandas code and formatting#468
Improve pandas code and formatting#468deppen8 wants to merge 1 commit intodatacarpentry:gh-pagesfrom deppen8:patch-2
Conversation
- Add lots of code style formatting where appropriate
- Replace references to isnull() with isna(). These methods are exactly the same for pandas, but isna() is consistent with fillna, dropna, etc.
- Replace a reference to `merged_left.genus` with `merged_left['genus']`, the preferred notation style for pandas
- Add more consistent use of `{: .output}` formatting
- Remove `u'string'` notation, which is a Python 2.x leftover, to match what learners will see with Python 3.x
|
Thank you, Jacob! Great work! I like the changes you suggest. I'm not 100% sure about the proper formatting for pandas. When we use back ticks we usually talk about code or something we type. Here, pandas is neither but a package name. How about we keep pandas "as was" for now and discuss this change in a separate PR (if you think we should do something to its style)? |
|
See my comment on #467, about |
|
Superseded by #541 |
…das" with backticks.
- Add lots of code style formatting where appropriate
- Replace references to isnull() with isna(). These methods are exactly the same for pandas, but isna() is consistent with fillna, dropna, etc.
- Replace a reference to merged_left.genus with merged_left['genus'], the preferred notation style for pandas
- Add more consistent use of {: .output} formatting
- Remove u'string' notation, which is a Python 2.x leftover, to match what learners will see with Python 3.x
Co-authored-by: Toby Hodges <tobyhodges@carpentries.org>
Co-authored-by: Jacob Deppen <deppen.8@gmail.com>
merged_left.genuswithmerged_left['genus'], the preferred notation style for pandas{: .output}formattingu'string'notation, which is a Python 2.x leftover, to match what learners will see with Python 3.xPlease delete this line and the text below before submitting your contribution.
Thanks for contributing! If this contribution is for instructor training, please send an email to checkout@carpentries.org with a link to this contribution so we can record your progress. You’ve completed your contribution step for instructor checkout just by submitting this contribution.
Please keep in mind that lesson maintainers are volunteers and it may be some time before they can respond to your contribution. Although not all contributions can be incorporated into the lesson materials, we appreciate your time and effort to improve the curriculum. If you have any questions about the lesson maintenance process or would like to volunteer your time as a contribution reviewer, please contact The Carpentries Team at team@carpentries.org.