Skip to content

Instantly share code, notes, and snippets.

@Sanket758
Last active November 5, 2020 15:45
Show Gist options
  • Save Sanket758/14c3268865566d506eeed221da5e753c to your computer and use it in GitHub Desktop.
Save Sanket758/14c3268865566d506eeed221da5e753c to your computer and use it in GitHub Desktop.
# Load the csv file
df = pd.read_csv('IMDB_reviews.csv')
# Extract the reviews and sentiments
reviews = np.array(df['review'])
sentiments = np.array(df['sentiment'])
# splitting the data into train and test sets
train_reviews = reviews[:35000]
train_sentiment = reviews[:35000]
test_reviews = reviews[35000:]
test_sentiments = sentiments[35000:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment