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
While working on #4163 I noticed that the fill value parameter for align (but maybe also reindex, concat, merge and combine_*?) will be used for all variables (except dimension coordinates) which is obviously not ideal when working with quantities. Would it make sense to optionally allow fill_value to be a dict which maps a fill value to a variable name?
I could get there by passing the default (dtypes.NA) and then using fillna, but that only seems to work with data variables so coordinates would need to pass through a reset_coords / set_coords cycle. Also, with this the dtype is changed to float.
The text was updated successfully, but these errors were encountered:
keewis
changed the title
allow specifying a fill value per
allow specifying a fill value per variable
Jun 19, 2020
While working on #4163 I noticed that the fill value parameter for
align
(but maybe alsoreindex
,concat
,merge
andcombine_*
?) will be used for all variables (except dimension coordinates) which is obviously not ideal when working with quantities. Would it make sense to optionally allowfill_value
to be a dict which maps a fill value to a variable name?Consider this:
I'd like to be able to do something like this instead:
I could get there by passing the default (
dtypes.NA
) and then usingfillna
, but that only seems to work with data variables so coordinates would need to pass through areset_coords
/set_coords
cycle. Also, with this the dtype is changed tofloat
.The text was updated successfully, but these errors were encountered: