Best Practices - Data Blocks

      Best Practices - Data Blocks


        Article summary

        • Structure the development of the data block as a unit test. Create 3 functions to simulate the data block layer.
          Function 1: Returns the data set(s) required for the business report.
          Function 2: This will contain the business logic required for the report creation including the data import from function 1.
          Function 3: This executes function 2 by providing the required parameters.

        • Use a calculation environment that contains only the required packages.

        • Usage of packages such as pandas should be reserved for instances where significant data preparation is required. If not, use dictionaries to process the data

        • Make sure there are no unused variables in the script.

        • Do not hard code any variables within function 2 referenced above.


        What's Next