Hi @Exitare and welcome 



 Exitare:

def _preprocess(sample):



This looks like an image preprocessing helper function.



 Exitare:

  image = tf.cast(sample['image'], tf.float32) / 255.  # Scale to unit interval.



This casts the tensor to dtype tf.float32 and normalizes the floating point values to the [0, 255] range.



 Exitare:

  image = image < tf.random.uniform(tf.shape(image))   # Randomly binarize.



Note: “The pixel intensities of MNIST images are almost binary.” (e.g. 255 is white, 0 is black).



 Exitare:

how to translate it from images (as per example) to the data I have, which is a big csv file with lots of columns and rows.



Check out the 3rd example 2 from the Intro to Autoencoders tutorial - it uses electrocadriogram data from a CSV file. Let us know if it helps.