home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 726635243

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/4575#issuecomment-726635243 https://api.github.com/repos/pydata/xarray/issues/4575 726635243 MDEyOklzc3VlQ29tbWVudDcyNjYzNTI0Mw== 10194086 2020-11-13T08:55:20Z 2020-11-13T08:55:20Z MEMBER

Yes, I think you could change https://github.com/pydata/xarray/blob/b76a13f042571d01ca07461f13125a030f7297ea/xarray/core/formatting.py#L144 to np.issubdtype(x, np.floating) so it formats all floats.

The other seems a bit more complicated: set_title has a template https://github.com/pydata/xarray/blob/b76a13f042571d01ca07461f13125a030f7297ea/xarray/plot/facetgrid.py#L461 but it uses format_item to format the numbers first https://github.com/pydata/xarray/blob/b76a13f042571d01ca07461f13125a030f7297ea/xarray/plot/facetgrid.py#L26 you could probably add a float_format="{:.4}" keyword argument to this function and set_titles.

We'd be happy to take a PR.

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