Skip to content

Instantly share code, notes, and snippets.

@jainanchit51
Last active December 9, 2018 19:25
Show Gist options
  • Save jainanchit51/9a870658a210e05091571a28e50ec6a4 to your computer and use it in GitHub Desktop.
Save jainanchit51/9a870658a210e05091571a28e50ec6a4 to your computer and use it in GitHub Desktop.
# mount your drive
from google.colab import drive
drive.mount('/content/drive')
# read the CSV file
md = pd. read_csv('drive/My Drive/Colab Notebooks/Movie_recommendation/movie_dataset/movies_metadata.csv')
# droping rows by index
md = md.drop([19730, 29503, 35587])
#performing look up opertion on all movies that are present in links_small dataset
md['id'] = md['id'].astype('int')
smd = md[md['id'].isin(links_small)]
smd.shape
smd['tagline'] = smd['tagline'].fillna(' ')
smd['tagline']
# Merging Overview and tittle together
smd['description'] = smd['overview'] + smd['tagline']
smd['description'] = smd['description'].fillna(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment