Not sure if I am reading this right? You would like to iterate though the dataframe, a set number of times, so you use head() to count from the top of the dataframe, and you use ENHANCER_CONVOLUTION to define how many rows from the top you would like to include? If so, then you should rename ENHANCER_CONVOLUTION to something else - as this name does not signify what it is being used for.
https://github.com/wtsi-hgi/Automated-Enhancer-Gene-SCRAMBLEr/blob/dee007b9dd13928e0d64522352d1b27152937f22/region_convolutions.py#L38
Not sure if I am reading this right? You would like to iterate though the dataframe, a set number of times, so you use
head()
to count from the top of the dataframe, and you use ENHANCER_CONVOLUTION to define how many rows from the top you would like to include? If so, then you should rename ENHANCER_CONVOLUTION to something else - as this name does not signify what it is being used for.