File size: 266 Bytes
de0f4c5
 
 
 
 
 
1
2
3
4
5
6
7
def custom_preprocessing(X):
    X = X.copy()
    X['Store_Age'] = 2025 - X['Store_Establishment_Year']
    X.drop('Store_Establishment_Year', axis=1, inplace=True)
    X['Product_Sugar_Content'] = X['Product_Sugar_Content'].replace({'reg': 'Regular'})
    return X