issues: 461127850
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
461127850 | MDU6SXNzdWU0NjExMjc4NTA= | 3050 | Pipe Operator? | 5635139 | closed | 0 | 1 | 2019-06-26T18:51:31Z | 2019-07-05T07:12:07Z | 2019-07-05T07:12:07Z | MEMBER | I realize this is a topic primed for bike-shedding, so I've held off suggesting, but here goes... Is there any interest in a pipe operator to make xarray syntax easier? Our internal code has much code like: ```python delinq_c = (
base_ds['delinq_comp_array']
# lots of ``` ...with lots of new lines starting with The addition of a pipe operator would allow for: ```python delinq_c = ( base_ds['delinq_comp_array'] >> lambda x: x - base_ds['delinq_comp_array'].mean('fsym_id') >> lambda x: x / delinq_diff >> lambda x: x * 2 ) ``` This requires (ab)using an existing python operator, such as Python has explicitly not added this, nor reduced the character count of I remember some discussions at pandas on similar topics. I can't find them all, but here's an issue re adding the |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/3050/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |