diff --git a/asf_core_data/pipeline/mcs/process/process_historical_mcs_installers.py b/asf_core_data/pipeline/mcs/process/process_historical_mcs_installers.py index 22b7dfb..7feea26 100644 --- a/asf_core_data/pipeline/mcs/process/process_historical_mcs_installers.py +++ b/asf_core_data/pipeline/mcs/process/process_historical_mcs_installers.py @@ -264,8 +264,7 @@ def get_missing_installers_info( # dropping unecessary variables missing_installers.drop( - columns=["date_of_creation"], - inplace=True, + columns=["date_of_creation"], inplace=True, ) return missing_installers @@ -609,6 +608,11 @@ def update_effective_to_date( right_on=installations_match_vars, ) + installer_data["effective_to"] = pd.to_datetime(installer_data["effective_to"]) + installer_data["commissioning_date"] = pd.to_datetime( + installer_data["commissioning_date"] + ) + installer_data["effective_to"] = installer_data.apply( lambda x: get_max_date(x["effective_to"], x["commissioning_date"]), axis=1 )