Closed eubtube closed 3 years ago
Fundamental to issues #2 and #3, completed with this snippet to define filter and break up grid into smaller projects:
def make_groups(df,nrow,ncol):
# A function to make new df columns "grouprow" and "groupcol" for filter iteration
# with user defined size
df['grouprow'] = df['row'].apply(lambda x: np.floor((x-1)/nrow+1).astype(int))
df['groupcol'] = df['col'].apply(lambda x: np.floor((x-1)/ncol+1).astype(int))
return df
Need to sort out how to iterate row and column ids to pull out a grouping as shown in below, where the first grouping takes Rows and columns 1-3, second takes R1-3, C4-6, etc. This is in the
iterate_grid.ipynb
file.