You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question regarding a usecase of mine (maybe it is a common one, I don't know).
Let's say df (a pandas.DataFrame) holds scalar values for a variable observed at different time, latitude and longitude. I can compute the variable mean over time, binned by longitude and latitude on a NxM grid as:
The shape allows me to control the underlying grid resolution, knowing the spatial extent of the observations.
However, I would like to directlly control the resulting bin_centers of the underlying grid, in the case of a regular grid, such that they match another grid. So far, I am achieving this by adding fake rows to df with the appropriate latitude and longitude coordinates. Is there a better / more direct way to do it?
Thanks.
Vadim
The text was updated successfully, but these errors were encountered:
Hi,
I have a question regarding a usecase of mine (maybe it is a common one, I don't know).
Let's say
df
(apandas.DataFrame
) holds scalar values for avariable
observed at differenttime
,latitude
andlongitude
. I can compute thevariable
mean overtime
, binned bylongitude
andlatitude
on aN
xM
grid as:The
shape
allows me to control the underlying grid resolution, knowing the spatial extent of the observations.However, I would like to directlly control the resulting
bin_centers
of the underlying grid, in the case of a regular grid, such that they match another grid. So far, I am achieving this by adding fake rows todf
with the appropriatelatitude
andlongitude
coordinates. Is there a better / more direct way to do it?Thanks.
Vadim
The text was updated successfully, but these errors were encountered: