> For the complete documentation index, see [llms.txt](https://docs.ladybug.tools/ladybug-primer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ladybug.tools/ladybug-primer/components/4_extra/to_unit.md).

# To Unit

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-88a2e11511042b1372868bbc11789c7c36b2a245%2FTo_Unit.png?alt=media)

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-63de2e2695dfa01827025401741ef07f65307494%2FTo_Unit.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src//LB%20To%20Unit.py)

Convert a DataCollection to the input \_to\_unit.

### Inputs

* **data \[Required]**

A DataCollection to be converted to different units.

* **to\_unit**

Text representing the unit to convert the DataCollection to (eg. m2). Connect the \_data and see the all\_unit output for a list of all currently-supported units for a given collection. The default won't perform any unit conversion on the output data.

### Outputs

* **all\_unit**

A list of all possible units that the input \_data can be converted to.

* **data**

The converted DataCollection.
