Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created December 26, 2020 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/c53b08168c865277678c3e5faa2b14d1 to your computer and use it in GitHub Desktop.
Save amankharwal/c53b08168c865277678c3e5faa2b14d1 to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
import math
import re
from scipy.sparse import csr_matrix
import matplotlib.pyplot as plt
import seaborn as sns
from surprise import Reader, Dataset, SVD
sns.set_style("darkgrid")
# Skip date
df1 = pd.read_csv('combined_data_1.txt', header = None, names = ['Cust_Id', 'Rating'], usecols = [0,1])
df1['Rating'] = df1['Rating'].astype(float)
df = df1
df.index = np.arange(0,len(df))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment