Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created June 30, 2021 11:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/89d645af57bb10a788ce383fe3e76f1f to your computer and use it in GitHub Desktop.
Save amankharwal/89d645af57bb10a788ce383fe3e76f1f to your computer and use it in GitHub Desktop.
import pandas as pd
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import MultinomialNB
data = pd.read_csv("news.csv")
print(data.head())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment