I have a text file that has integers ranging from 0-255 (grayscale values of images of digits) all separated by tabs. I want to read the file using pandas/numpy and arrange it into a 2D array with 1 column and the number of rows corresponding to the number of sample images I have. So each row would have 784 integers (28X28 pixel values of an image flattened). So basically split the text file into chunks of 784 integers.
I want to read the file using pandas/numpy and arrange it into a 2D array with 1 column
So each row would have 784 integers
If you want each row to have 784 integers, then you want 784 columns.
You can probably do something like this:
images = pd.read_csv(<filename>, sep="\t", header=None)