Get familiar with Python coding styles, idioms, and get set up to do automatic linting!
MIT License
Get familiar with Python coding styles, idioms, and get set up to do automatic linting!
I made this short tutorial for my fellow Insight Fellows. However, I see it as being applicable to data scientists out there.
For data scientists, coding style can affect personal and team productivity. The biggest motivation for writing code with good style is maintenance. A few months down the road, you're going to be reading your own code, or you're going to hand off your code to an engineering team to be put into production. If you write code with good style, your personal and team productivity will simultaneously improve for the long run.
Remember, small wins compound into big wins!
Code style seemingly looks like YARTF: "yet-another-requirement-to-fulfill". That's because code style requirements are picky, opinionated, and worst of all difficult to memorize. Fear not! There's a way out.
We use linters! Code linters have those picky, opinionated (I will address this point later) criteria programmed into their codebase. This means they're able to automatically figure out where your code doesn't match accepted code style!