Skip to content

Instantly share code, notes, and snippets.

@andreaschandra
Created June 27, 2019 12:24
Show Gist options
  • Select an option

  • Save andreaschandra/eff838594c5a102e5f8c51f8b3781ab6 to your computer and use it in GitHub Desktop.

Select an option

Save andreaschandra/eff838594c5a102e5f8c51f8b3781ab6 to your computer and use it in GitHub Desktop.
data_path = 'data'
files = glob.glob(data_path + '/*')
train = pickle.load(open(files[1], 'rb'))
test = pickle.load(open(files[0], 'rb'))
d_train = pd.DataFrame(data={'content': train[0], 'label': train[1]})
d_test = pd.DataFrame(data={'content': test[0], 'label': test[1]})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment