Can you save it this way?
import numpy as np
import pandas as pd
from scipy.misc import imsave
file=6
df = pd.read_csv('./data/{}.csv'.format(file))
for c in range(23000):
    label=df.iloc[c][0]
    im=df.iloc[c][1:].as_matrix().reshape(33,33)
    imsave("./data/train/{}/{}_{}.png".format(label, file, c), im)

For some reason, your image is right now in rgb instead of black and white, if this doesn’t work,
come to github and lets write a custom dataloader for you.