MAINT: Give nice error message if xarray import fails
State: closed

Title is self-explanatory.  Shouldn't `xarray` get the same nice error message as `feather-format`?

Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=h1) Report
> Merging [#16664](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ceaf85233d434a226b23f891465b4abfdc602e46?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `50%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16664/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16664      +/-   ##
==========================================
- Coverage   90.93%   90.93%   -0.01%     
==========================================
  Files         161      161              
  Lines       49266    49269       +3     
==========================================
  Hits        44801    44801              
- Misses       4465     4468       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.69% <50%> (-0.01%)` | :arrow_down: |
| #single | `40.22% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.27% <50%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.23% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=footer). Last update [ceaf852...8925f00](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=h1) Report
> Merging [#16664](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ceaf85233d434a226b23f891465b4abfdc602e46?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `50%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/16664/graphs/tree.svg?width=650&token=eZ4WkYLtcO&height=150&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #16664      +/-   ##
==========================================
- Coverage   90.93%   90.93%   -0.01%     
==========================================
  Files         161      161              
  Lines       49266    49269       +3     
==========================================
  Hits        44801    44801              
- Misses       4465     4468       +3
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.69% <50%> (-0.01%)` | :arrow_down: |
| #single | `40.22% <0%> (-0.01%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/generic.py](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ2VuZXJpYy5weQ==) | `92.27% <50%> (-0.1%)` | :arrow_down: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.23% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=footer). Last update [ceaf852...8925f00](https://codecov.io/gh/pandas-dev/pandas/pull/16664?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks!