{"id":26246063,"url":"https://github.com/zillow/zdatasets","last_synced_at":"2025-04-23T20:26:47.695Z","repository":{"id":38189714,"uuid":"416481878","full_name":"zillow/zdatasets","owner":"zillow","description":"Dataset SDK for consistent read/write [batch, online, streaming] data.","archived":false,"fork":false,"pushed_at":"2024-05-07T23:31:08.000Z","size":506,"stargazers_count":6,"open_issues_count":4,"forks_count":3,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-30T03:11:49.745Z","etag":null,"topics":["data","metaflow","ml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zillow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-10-12T20:07:24.000Z","updated_at":"2024-06-13T23:01:54.000Z","dependencies_parsed_at":"2023-07-18T02:03:24.269Z","dependency_job_id":"0e43c7c0-e8f2-4bfe-ab00-1dda76b180bd","html_url":"https://github.com/zillow/zdatasets","commit_stats":null,"previous_names":["zillow/zdatasets","zillow/datasets"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillow%2Fzdatasets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillow%2Fzdatasets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillow%2Fzdatasets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zillow%2Fzdatasets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zillow","download_url":"https://codeload.github.com/zillow/zdatasets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250508049,"owners_count":21442150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","metaflow","ml"],"created_at":"2025-03-13T13:17:22.757Z","updated_at":"2025-04-23T20:26:47.676Z","avatar_url":"https://github.com/zillow.png","language":"Python","funding_links":[],"categories":["Third-Party Integrations"],"sub_categories":[],"readme":"![Tests](https://github.com/zillow/datasets/actions/workflows/test.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/zillow/datasets/badge.svg)](https://coveralls.io/github/zillow/datasets)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/zillow/datasets/main?urlpath=lab/tree/datasets/tutorials)\n\n\n# Welcome to zdatasets\n==================================================\n\nTODO\n\n```python\nimport pandas as pd\nfrom metaflow import FlowSpec, step\n\nfrom zdatasets import Dataset, Mode\nfrom zdatasets.metaflow import DatasetParameter\nfrom zdatasets.plugins import BatchOptions\n\n\n# Can also invoke from CLI:\n#  \u003e python zdatasets/tutorials/0_hello_dataset_flow.py run \\\n#    --hello_dataset '{\"name\": \"HelloDataset\", \"mode\": \"READ_WRITE\", \\\n#    \"options\": {\"type\": \"BatchOptions\", \"partition_by\": \"region\"}}'\nclass HelloDatasetFlow(FlowSpec):\n    hello_dataset = DatasetParameter(\n        \"hello_dataset\",\n        default=Dataset(\"HelloDataset\", mode=Mode.READ_WRITE, options=BatchOptions(partition_by=\"region\")),\n    )\n\n    @step\n    def start(self):\n        df = pd.DataFrame({\"region\": [\"A\", \"A\", \"A\", \"B\", \"B\", \"B\"], \"zpid\": [1, 2, 3, 4, 5, 6]})\n        print(\"saving data_frame: \\n\", df.to_string(index=False))\n\n        # Example of writing to a dataset\n        self.hello_dataset.write(df)\n\n        # save this as an output dataset\n        self.output_dataset = self.hello_dataset\n\n        self.next(self.end)\n\n    @step\n    def end(self):\n        print(f\"I have dataset \\n{self.output_dataset=}\")\n\n        # output_dataset to_pandas(partitions=dict(region=\"A\")) only\n        df: pd.DataFrame = self.output_dataset.to_pandas(partitions=dict(region=\"A\"))\n        print('self.output_dataset.to_pandas(partitions=dict(region=\"A\")):')\n        print(df.to_string(index=False))\n\n\nif __name__ == \"__main__\":\n    HelloDatasetFlow()\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzillow%2Fzdatasets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzillow%2Fzdatasets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzillow%2Fzdatasets/lists"}