home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1460844042

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/7597#issuecomment-1460844042 https://api.github.com/repos/pydata/xarray/issues/7597 1460844042 IC_kwDOAMm_X85XErYK 127195910 2023-03-08T20:36:16Z 2023-03-14T19:41:29Z NONE

The interpolate_na function is typically used to fill missing values (NAs) in a data frame or array by interpolating between existing values. It has an optional argument called max_gap which specifies the maximum number of consecutive NAs that can be filled in a single interpolation step.

However, the max_gap argument may not work as expected at the boundaries of an array, as there may not be enough data points available to fill the maximum gap. For example, if the max_gap is set to 3 and there are only two consecutive NAs at the boundary of an array, the function will not be able to fill those NAs.

One way to handle this issue is to reduce the max_gap value near the boundaries of the array. For example, you could set the max_gap to 1 for the first and last few rows or columns of the array, depending on the structure of your data. Alternatively, you could use a different interpolation method (e.g., linear interpolation) that does not require a fixed max_gap value.

It's also worth noting that the interpolate_na function may not always be the best approach for filling missing values, as it assumes that the data has a smooth, continuous structure. If your data has a more complex structure (e.g., sharp discontinuities), other methods such as regression or machine learning models may be more appropriate.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1615599224
Powered by Datasette · Queries took 0.774ms · About: xarray-datasette