Feb-05-2022, 05:17 PM
I have a question. I have a dataframe in format ['x','y','z']. The columns have 100 values in them.
I also have created a regular grid in the following manner.
I also have created a regular grid in the following manner.
extent = x_min, x_max, y_min, y_max = [df.x.min()-100, df.x.max()+100, df.y.min()-100, df.y.max()+100] grid_x, grid_y = np.mgrid[x_min:x_max:100, y_min:y_max:100]Now question: I would like to create a an array of 100x100 where it is filled with NaNs if the point is not on the grid. And it should equal to z value if the point 'x' 'y' is found in my dataframe. Any suggestions? Thank you!