Skip to content

Instantly share code, notes, and snippets.

@wtberry
Created June 23, 2019 21:22
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 wtberry/e374ca14eab2836c8e5e1ec2bea09cfb to your computer and use it in GitHub Desktop.
Save wtberry/e374ca14eab2836c8e5e1ec2bea09cfb to your computer and use it in GitHub Desktop.
import pandas as pd
import os
import numpy as np
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
# setting up path to the data file
PATH = os.path.dirname(os.path.realpath(__file__))
PATH = os.path.join(PATH, 'data')
print(PATH)
names = 'multi_class_names.csv'
# read in the data as panda dataframe
df = pd.read_csv(os.path.join(PATH, names))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment