home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 115979105

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
115979105 MDU6SXNzdWUxMTU5NzkxMDU= 652 ENH: Apply numpy function to named axes 5635139 closed 0     2 2015-11-09T22:11:19Z 2015-11-10T16:18:24Z 2015-11-10T16:18:24Z MEMBER      

I'm currently transitioning sequences of pandas Panels over to xray Datasets. Part of our process applies a set of functions to Panels; for example:

python panel = panel.apply(lambda x: x.rank(ascending=False), axis=(1, 2)) df = np.nanpercentile(panel, q=75, axis=2)

One of the benefits of xray is the clarity that comes from named axes. Is there a way of applying a function over named axes? For example:

python result = data_array.apply(np.argsort, axis=('Risk', 'Dates')) result = data_array.apply(np.nanpercentile, axis='Dates')

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/652/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 0 rows from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 0.532ms · About: xarray-datasette