From 3feec183fe567a106c00a1d891f8bd688248885b Mon Sep 17 00:00:00 2001 From: Ivan Ugrin Date: Tue, 28 May 2024 16:36:40 +0300 Subject: [PATCH] Fix related to column renaming after aggregating test frequency (#698) Co-authored-by: Colt Allen <10178857+ColtAllen@users.noreply.github.com> --- pymc_marketing/clv/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pymc_marketing/clv/utils.py b/pymc_marketing/clv/utils.py index 2d16d0c38..1abcc7933 100644 --- a/pymc_marketing/clv/utils.py +++ b/pymc_marketing/clv/utils.py @@ -563,7 +563,7 @@ def rfm_train_test_split( ).reset_index() test_rfm_data = test_rfm_data.rename( - columns={"id": "customer_id", "date": "test_frequency"} + columns={customer_id_col: "customer_id", datetime_col: "test_frequency"} ) if monetary_value_col: