Removes all attributes from the DataArray. Parameters ---------- deep : bool, default True Removes attributes from coordinates. Returns ------- DataArray
(self, *, deep: bool = True)
| 7722 | str = utils.UncachedAccessor(StringAccessor["DataArray"]) |
| 7723 | |
| 7724 | def drop_attrs(self, *, deep: bool = True) -> Self: |
| 7725 | """ |
| 7726 | Removes all attributes from the DataArray. |
| 7727 | |
| 7728 | Parameters |
| 7729 | ---------- |
| 7730 | deep : bool, default True |
| 7731 | Removes attributes from coordinates. |
| 7732 | |
| 7733 | Returns |
| 7734 | ------- |
| 7735 | DataArray |
| 7736 | """ |
| 7737 | if not deep: |
| 7738 | return self._replace(attrs={}) |
| 7739 | else: |
| 7740 | return ( |
| 7741 | self._to_temp_dataset() |
| 7742 | .drop_attrs(deep=deep) |
| 7743 | .pipe(self._from_temp_dataset) |
| 7744 | ) |
nothing calls this directly
no test coverage detected