pytask-dev / pytask-dev/pytask
ENH: add some more common Nodes
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 146
- Fork
- 14
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 34
Mô tả
Writing pandas dataframes to disk seems really common. I am going to have to write my own DFNode class for this. Would you like me to generalize it enough and then contribute it here?
I would imagine something like
class DFNode:
def __init__(self, path: str | ..., kind: Literal["csv", "parquet", ...], load_kwargs: dict[str, Any = {}, save_kwargs: dict[str, Any]):
self.path = path
self.kind = kind
self.load_kwargs = load_kwargs
self.save_kwargs = save_kwargs
def save(self, value: Any) -> None:
saver = getattr(value, f"to_{self.kind}")
saver(self.path, **self.save_kwargs)
def load(self, is_product: bool) -> Any:
if is_product:
return self
loader = getattr(pd, f"read_{self.kind}")
return loader(self.path, **self.load_kwargs)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
The issue provides a proposed DFNode class but names no repository files, tests, or entry point. Start by reviewing the existing Node abstractions and pandas read_* and to_* conventions; the work would be complete when the project has an agreed, tested way to read and write common dataframe formats with load and save options.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- pandas, python
- Lĩnh vực
- data
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100