{"id":13484677,"url":"https://github.com/pydata/xarray","last_synced_at":"2025-12-22T21:07:04.021Z","repository":{"id":10920764,"uuid":"13221727","full_name":"pydata/xarray","owner":"pydata","description":"N-D labeled arrays and datasets in Python","archived":false,"fork":false,"pushed_at":"2025-05-08T17:39:04.000Z","size":49500,"stargazers_count":3789,"open_issues_count":1226,"forks_count":1137,"subscribers_count":106,"default_branch":"main","last_synced_at":"2025-05-12T00:54:38.793Z","etag":null,"topics":["dask","netcdf","numpy","pandas","python","xarray"],"latest_commit_sha":null,"homepage":"https://xarray.dev","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/pydata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"numfocus","custom":"https://numfocus.org/donate-to-xarray"}},"created_at":"2013-09-30T17:21:10.000Z","updated_at":"2025-05-11T15:05:00.000Z","dependencies_parsed_at":"2023-12-18T22:50:21.402Z","dependency_job_id":"ef289df1-ddf1-425b-8064-6b9de41f0ddc","html_url":"https://github.com/pydata/xarray","commit_stats":{"total_commits":5187,"total_committers":547,"mean_commits":9.482632541133455,"dds":0.7576633892423366,"last_synced_commit":"038436365d4757a322cac37307503c132d1fe2a7"},"previous_names":["xray/xray"],"tags_count":106,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydata%2Fxarray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydata%2Fxarray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydata%2Fxarray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pydata%2Fxarray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pydata","download_url":"https://codeload.github.com/pydata/xarray/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655955,"owners_count":21943081,"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":["dask","netcdf","numpy","pandas","python","xarray"],"created_at":"2024-07-31T17:01:29.651Z","updated_at":"2025-12-22T21:07:04.006Z","avatar_url":"https://github.com/pydata.png","language":"Python","readme":"# xarray: N-D labeled arrays and datasets\n\n[![Xarray](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydata/xarray/refs/heads/main/doc/badge.json)](https://xarray.dev)\n[![Powered by Pixi](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)\n[![CI](https://github.com/pydata/xarray/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/pydata/xarray/actions/workflows/ci.yaml?query=branch%3Amain)\n[![Code coverage](https://codecov.io/gh/pydata/xarray/branch/main/graph/badge.svg?flag=unittests)](https://codecov.io/gh/pydata/xarray)\n[![Docs](https://readthedocs.org/projects/xray/badge/?version=latest)](https://docs.xarray.dev/)\n[![Benchmarked with asv](https://img.shields.io/badge/benchmarked%20by-asv-green.svg?style=flat)](https://asv-runner.github.io/asv-collection/xarray/)\n[![Formatted with black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)\n[![Available on pypi](https://img.shields.io/pypi/v/xarray.svg)](https://pypi.python.org/pypi/xarray/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/xarray)](https://pypistats.org/packages/xarray)\n[![Conda - Downloads](https://img.shields.io/conda/dn/anaconda/xarray?label=conda%7Cdownloads)](https://anaconda.org/anaconda/xarray)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.598201.svg)](https://doi.org/10.5281/zenodo.598201)\n[![Examples on binder](https://img.shields.io/badge/launch-binder-579ACA.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFkAAABZCAMAAABi1XidAAAB8lBMVEX///9XmsrmZYH1olJXmsr1olJXmsrmZYH1olJXmsr1olJXmsrmZYH1olL1olJXmsr1olJXmsrmZYH1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olJXmsrmZYH1olL1olL0nFf1olJXmsrmZYH1olJXmsq8dZb1olJXmsrmZYH1olJXmspXmspXmsr1olL1olJXmsrmZYH1olJXmsr1olL1olJXmsrmZYH1olL1olLeaIVXmsrmZYH1olL1olL1olJXmsrmZYH1olLna31Xmsr1olJXmsr1olJXmsrmZYH1olLqoVr1olJXmsr1olJXmsrmZYH1olL1olKkfaPobXvviGabgadXmsqThKuofKHmZ4Dobnr1olJXmsr1olJXmspXmsr1olJXmsrfZ4TuhWn1olL1olJXmsqBi7X1olJXmspZmslbmMhbmsdemsVfl8ZgmsNim8Jpk8F0m7R4m7F5nLB6jbh7jbiDirOEibOGnKaMhq+PnaCVg6qWg6qegKaff6WhnpKofKGtnomxeZy3noG6dZi+n3vCcpPDcpPGn3bLb4/Mb47UbIrVa4rYoGjdaIbeaIXhoWHmZYHobXvpcHjqdHXreHLroVrsfG/uhGnuh2bwj2Hxk17yl1vzmljzm1j0nlX1olL3AJXWAAAAbXRSTlMAEBAQHx8gICAuLjAwMDw9PUBAQEpQUFBXV1hgYGBkcHBwcXl8gICAgoiIkJCQlJicnJ2go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8kanKMAQg0qSyuZfn7zItsbGyO9QlnxY0eCuD1XL2ys/MsrQhltE7Ug0uFOzufJFE2PxBo/YAx8XPPdDwWN0MrDRYIZF0mSMKCNHgaIVFoBbNoLJ7tEQDKxGF0kcLQimojCZopv0OkNOyWCCg9XMVAi7ARJzQdM2QUh0gmBozjc3Skg6dSBRqDGYSUOu66Zg+I2fNZs/M3/f/Grl/XnyF1Gw3VKCez0PN5IUfFLqvgUN4C0qNqYs5YhPL+aVZYDE4IpUk57oSFnJm4FyCqqOE0jhY2SMyLFoo56zyo6becOS5UVDdj7Vih0zp+tcMhwRpBeLyqtIjlJKAIZSbI8SGSF3k0pA3mR5tHuwPFoa7N7reoq2bqCsAk1HqCu5uvI1n6JuRXI+S1Mco54YmYTwcn6Aeic+kssXi8XpXC4V3t7/ADuTNKaQJdScAAAAAElFTkSuQmCC)](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/weather-data.ipynb)\n[![Twitter](https://img.shields.io/twitter/follow/xarray_dev?style=social)](https://x.com/xarray_dev)\n\n**xarray** (pronounced \"ex-array\", formerly known as **xray**) is an open source project and Python\npackage that makes working with labelled multi-dimensional arrays\nsimple, efficient, and fun!\n\nXarray introduces labels in the form of dimensions, coordinates and\nattributes on top of raw [NumPy](https://www.numpy.org)-like arrays,\nwhich allows for a more intuitive, more concise, and less error-prone\ndeveloper experience. The package includes a large and growing library\nof domain-agnostic functions for advanced analytics and visualization\nwith these data structures.\n\nXarray was inspired by and borrows heavily from\n[pandas](https://pandas.pydata.org), the popular data analysis package\nfocused on labelled tabular data. It is particularly tailored to working\nwith [netCDF](https://www.unidata.ucar.edu/software/netcdf) files, which\nwere the source of xarray\\'s data model, and integrates tightly with\n[dask](https://dask.org) for parallel computing.\n\n## Why xarray?\n\nMulti-dimensional (a.k.a. N-dimensional, ND) arrays (sometimes called\n\"tensors\") are an essential part of computational science. They are\nencountered in a wide range of fields, including physics, astronomy,\ngeoscience, bioinformatics, engineering, finance, and deep learning. In\nPython, [NumPy](https://www.numpy.org) provides the fundamental data\nstructure and API for working with raw ND arrays. However, real-world\ndatasets are usually more than just raw numbers; they have labels which\nencode information about how the array values map to locations in space,\ntime, etc.\n\nXarray doesn\\'t just keep track of labels on arrays \\-- it uses them to\nprovide a powerful and concise interface. For example:\n\n- Apply operations over dimensions by name: `x.sum('time')`.\n- Select values by label instead of integer location:\n  `x.loc['2014-01-01']` or `x.sel(time='2014-01-01')`.\n- Mathematical operations (e.g., `x - y`) vectorize across multiple\n  dimensions (array broadcasting) based on dimension names, not shape.\n- Flexible split-apply-combine operations with groupby:\n  `x.groupby('time.dayofyear').mean()`.\n- Database like alignment based on coordinate labels that smoothly\n  handles missing values: `x, y = xr.align(x, y, join='outer')`.\n- Keep track of arbitrary metadata in the form of a Python dictionary:\n  `x.attrs`.\n\n## Documentation\n\nLearn more about xarray in its official documentation at\n\u003chttps://docs.xarray.dev/\u003e.\n\nTry out an [interactive Jupyter\nnotebook](https://mybinder.org/v2/gh/pydata/xarray/main?urlpath=lab/tree/doc/examples/weather-data.ipynb).\n\n## Contributing\n\nYou can find information about contributing to xarray at our\n[Contributing\npage](https://docs.xarray.dev/en/stable/contributing.html).\n\n## Get in touch\n\n- Ask usage questions (\"How do I?\") on\n  [GitHub Discussions](https://github.com/pydata/xarray/discussions).\n- Report bugs, suggest features or view the source code [on\n  GitHub](https://github.com/pydata/xarray).\n- For less well defined questions or ideas, or to announce other\n  projects of interest to xarray users, use the [mailing\n  list](https://groups.google.com/forum/#!forum/xarray).\n\n## NumFOCUS\n\n\u003cimg src=\"https://numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png\" width=\"200\" href=\"https://numfocus.org/\"\u003e\n\nXarray is a fiscally sponsored project of\n[NumFOCUS](https://numfocus.org), a nonprofit dedicated to supporting\nthe open source scientific computing community. If you like Xarray and\nwant to support our mission, please consider making a\n[donation](https://numfocus.org/donate-to-xarray) to support\nour efforts.\n\n## History\n\nXarray is an evolution of an internal tool developed at [The Climate\nCorporation](https://climate.com/). It was originally written by Climate\nCorp researchers Stephan Hoyer, Alex Kleeman and Eugene Brevdo and was\nreleased as open source in May 2014. The project was renamed from\n\"xray\" in January 2016. Xarray became a fiscally sponsored project of\n[NumFOCUS](https://numfocus.org) in August 2018.\n\n## Contributors\n\nThanks to our many contributors!\n\n[![Contributors](https://contrib.rocks/image?repo=pydata/xarray)](https://github.com/pydata/xarray/graphs/contributors)\n\n## License\n\nCopyright 2014-2024, xarray Developers\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you\nmay not use this file except in compliance with the License. You may\nobtain a copy of the License at\n\n\u003chttps://www.apache.org/licenses/LICENSE-2.0\u003e\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nXarray bundles portions of pandas, NumPy and Seaborn, all of which are\navailable under a \"3-clause BSD\" license:\n\n- pandas: `setup.py`, `xarray/util/print_versions.py`\n- NumPy: `xarray/compat/npcompat.py`\n- Seaborn: `_determine_cmap_params` in `xarray/plot/utils.py`\n\nXarray also bundles portions of CPython, which is available under the\n\"Python Software Foundation License\" in `xarray/namedarray/pycompat.py`.\n\nXarray uses icons from the icomoon package (free version), which is\navailable under the \"CC BY 4.0\" license.\n\nThe full text of these licenses are included in the licenses directory.\n","funding_links":["https://github.com/sponsors/numfocus","https://numfocus.org/donate-to-xarray"],"categories":["Python","Data Manipulation","Examples or singular models","Climate Change","Data Processing","数据容器和结构","How does it work?","其他_机器学习与深度学习","Interesting Non EO parts Python","Data Containers \u0026 Dataframes"],"sub_categories":["Data Frames","Climate Data Standards","Data Representation","GEDI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydata%2Fxarray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpydata%2Fxarray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpydata%2Fxarray/lists"}