python-novice-gapminder icon indicating copy to clipboard operation
python-novice-gapminder copied to clipboard

Improve dataframe naming conventions

Open ndporter opened this issue 6 years ago • 2 comments

Proposed updated episode using dataframe naming convention throughout (data_[region]_[indexColumn]) and added bullets pointing out the advantages. The changes would need to be consistent throughout all episodes before being merged to main lesson to demonstrate preferred naming conventions. Previously dataframes were overwritten and less clearly distinguishable (e.g. data).

ndporter avatar Apr 16 '20 19:04 ndporter

Thanks I agree completely that this is improvement and more in line with good practices. I would welcome a consistent renaming through all episodes. How about about taking it a step further, like data -> data_oceania -> gdp_oceania ?

vahtras avatar Apr 24 '20 15:04 vahtras

I agree, having the same dataframe naming convention would be good. It would help in understanding what is being plotted and when. Can me more to type; however, the convention is to have meaningful variable names, which this would improve on.

daviddelene avatar Sep 22 '20 12:09 daviddelene

Sorry we let this languish but the idea is a good one! I've added your changes as well as some minor improvements to my fork at https://github.com/alee/python-novice-gapminder/tree/improve-variable-names and also created issue #628 to track this.

For future reference you should also create a new branch before making changes and submitting a pull request - this will make it easier to keep your fork and this upstream repository properly synchronized. Thanks!

alee avatar Apr 18 '23 04:04 alee