# -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
# -*- coding: utf-8 -*-
import dataiku
import pandas as pd, numpy as np
from dataiku import pandasutils as pdu

# Read recipe inputs
product_strategy_merged = dataiku.Dataset("product_strategy_merged")
product_strategy_merged_df = product_strategy_merged.get_dataframe()


# -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
tmp_cols= ["initial_"+col if col != "product_id" else col for col in product_strategy_merged_df.columns]
product_strategy_merged_df.columns = tmp_cols

# -------------------------------------------------------------------------------- NOTEBOOK-CELL: CODE
initial_product_strategy_df = product_strategy_merged_df # For this sample code, simply copy input to output

# Write recipe outputs
initial_product_strategy = dataiku.Dataset("initial_product_strategy")
initial_product_strategy.write_with_schema(initial_product_strategy_df)