Allow Custom Indexes to define HTML repr for managed coords

Đang mở
#11,018 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
pandas, python
Lĩnh vực
data, frontend

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi cách các repr của Dataset tạo HTML cho các coords được quản lý, sau đó so sánh các biểu diễn hiện có của xarray và pandas MultiIndex. Mục tiêu của issue là một repr HTML ở cấp Index mà Dataset có thể tạo cho các coords được quản lý; được xem là hoàn thành khi các index tùy chỉnh có thể giảm phần output tọa độ quá mức mà vẫn giữ lại thông tin hữu ích.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement
Is your feature request related to a problem?

When a complicated index is attached to a dataset it can potentially fill up the coords field with lots of extra low value information. For example for the builtin multiindex the xarray version looks like this:

Image

which is lower signal to noise than the equivalent pandas repr:

Image

or in the case of layered intervals annotating a dimension (https://ianhuntisaak.com/xarray-linked-indexes/) the coords can really get out of hand

Image
Describe the solution you'd like

Allow Indexes to override the default html repr for any coords that they manage. The dataset repr can compose itself out of the reprs for coords from coords, so the would be in charge of returing the html +/- css for those coords

I think the built in multindex could be a nice example use case of this.

Describe alternatives you've considered

No response

Additional context

No response

cc @benbovy @keewis @dcherian

Ngôn ngữ chính
Python
Star
4.2k
Fork
1.5k
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
70

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pydata/xarray

Tất cả issue của pydata/xarray

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.