Spaces:
Sleeping
Sleeping
juanmartip95
commited on
Commit
•
d44530c
1
Parent(s):
a949a92
Update utils.py
Browse files
utils.py
CHANGED
@@ -56,7 +56,7 @@ def load_and_preprocess_data():
|
|
56 |
|
57 |
# Add the categorical index to the starting dataframe
|
58 |
#df["CustomerIndex"] = user_idx
|
59 |
-
|
60 |
# Merging both DataFrames based on respective common columns
|
61 |
merged_df = pd.merge(df, df_users[['User-ID', 'Location', 'Age']], on='User-ID', how='left')
|
62 |
merged_df = pd.merge(merged_df, df_books[['ISBN', 'Book-Title', 'Book-Author', 'Year-Of-Publication']], on='ISBN', how='left')
|
|
|
56 |
|
57 |
# Add the categorical index to the starting dataframe
|
58 |
#df["CustomerIndex"] = user_idx
|
59 |
+
merged_df["ProductIndex"] = product_idx
|
60 |
# Merging both DataFrames based on respective common columns
|
61 |
merged_df = pd.merge(df, df_users[['User-ID', 'Location', 'Age']], on='User-ID', how='left')
|
62 |
merged_df = pd.merge(merged_df, df_books[['ISBN', 'Book-Title', 'Book-Author', 'Year-Of-Publication']], on='ISBN', how='left')
|