Skip to content

Instantly share code, notes, and snippets.

@k501
Last active January 18, 2022 14:30
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 k501/e0ab73e760504b99e7cc to your computer and use it in GitHub Desktop.
Save k501/e0ab73e760504b99e7cc to your computer and use it in GitHub Desktop.
to convert csv to pkl
from pylearn2.datasets.csv_dataset import CSVDataset
import pickle
print 'convert: train.csv -> train.pkl'
pyln_data = CSVDataset("../R/out_for_pylearn2/train.csv", one_hot=True, delimiter=',')
pickle.dump( pyln_data, open( "data/train.pkl" , 'w' ) )
@chinedm
Copy link

chinedm commented Apr 13, 2021

thanks

@amitchakraborty123
Copy link

How can I run this file in python?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment