Responsible Data Science by Grant Fleming & Peter Bruce

Responsible Data Science by Grant Fleming & Peter Bruce

Author:Grant Fleming & Peter Bruce [Fleming, Grant & Bruce, Peter]
Language: eng
Format: epub
ISBN: 9781119741640
Publisher: Wiley
Published: 2021-05-04T00:00:00+00:00


Addressing Execution Variability with Functionalized Code

Functionalizing our code takes care of execution variability and is a generally good practice for any code that is meant to be either used multiple times or used by multiple different people. Wrapping the previous code within a function ensures that we always generate the appropriate result every time it is run, giving us an opportunity to control for stochastic and execution variability, should users decide to rerun code chunks. Given the same raw data, our functionalized code ought to always generate the same results regardless of how many times it is run.

data = preprocessor(df_raw)

Plus, writing and understanding one line of code is much simpler than trying to write and understand tens of lines.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.