NaN
numbers when i do mean--
You received this message because you are subscribed to the Google Groups "xarray" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xarray+unsubscribe@googlegroups.com.
To post to this group, send email to xar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xarray/4ae6c887-6b22-41df-b787-5168d9c21bc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Xarray excludes NaN values by default, just like pandas. If desired, you can disable this by calling .mean(skipna=False).You will still see NaNs in your results if every value to be averaged is NaN.
On Tue, Oct 11, 2016 at 4:32 PM, yar michl <yaro...@gmail.com> wrote:
is it possible to define to ignore nan vale when i do ds.groupby('time.week').mean()i have a a xarray with with daily data of a year with a dims of ('time', 'y', 'x') in the daily data sometime i have nan valeand whaen i do ds.groupby('time.season').mean() i got nan in some In some placesin pandas.DataFrame i understood it will automatically excludeNaN
numbers when i do meani didnt see a way to do igonre nan in gropby in xarrayshould i mask the nan vale ? and then do ds.groupby('time.week').mean()thek for the helpand thanks for the xarray module
--
You received this message because you are subscribed to the Google Groups "xarray" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xarray+un...@googlegroups.com.
Xarray excludes NaN values by default, just like pandas. If desired, you can disable this by calling .mean(skipna=False).You will still see NaNs in your results if every value to be averaged is NaN.
On Tue, Oct 11, 2016 at 4:32 PM, yar michl <yaro...@gmail.com> wrote:
is it possible to define to ignore nan vale when i do ds.groupby('time.week').mean()i have a a xarray with with daily data of a year with a dims of ('time', 'y', 'x') in the daily data sometime i have nan valeand whaen i do ds.groupby('time.season').mean() i got nan in some In some placesin pandas.DataFrame i understood it will automatically excludeNaN
numbers when i do meani didnt see a way to do igonre nan in gropby in xarrayshould i mask the nan vale ? and then do ds.groupby('time.week').mean()thek for the helpand thanks for the xarray module
--
You received this message because you are subscribed to the Google Groups "xarray" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xarray+un...@googlegroups.com.
Does this also apply to custom functions using .apply()?The function I am applying is using a function from scipy that still computes even if the input array values are nan (genextreme.fit())I tried adding a line to my function to ignore if the array is nans, but this slowed things by a factor of 3, i.e. it is faster to compute the nans than to exclude them.Currently I am doingstacked.groupby('allpoints').apply(func)Would there be any good way to exclude the nans before the groupby proceedure?
--
You received this message because you are subscribed to the Google Groups "xarray" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xarray+unsubscribe@googlegroups.com.
To post to this group, send email to xar...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xarray/7c0f6c4f-5b2c-4a7e-9d20-318ea7a9d6d5%40googlegroups.com.