Skip to contents

This function reads a change log from an Excel file and applies the changes to a dataframe. It ensures the new values are correctly converted to the appropriate data types before applying the changes.

Usage

apply_change_log(data)

Arguments

data

A dataframe containing the master data.

Value

A dataframe with the applied changes.

Details

The change log should be an Excel file located at "data_raw/change_log/data_change_log.xlsx" with columns: `RecordID`, `Field`, `NewValue`. The function reads the change log, converts the `NewValue` to the appropriate type based on the column type in the master dataframe, and applies the changes.