Simplify time slicing in Comparer.sel()
Open
- Dominant language
- Python
- Stars
- 56
- Forks
- 9
- Avg merge
- 57m
- Merged PRs (30d)
- 3
Description
The time slicing in `Comparer.sel()` uses an overly complex chain:
```python
d = d.sel(time=d.time.to_index().to_frame().loc[start:end].index)
```
This could likely be simplified to:
```python
d = d.sel(time=slice(start, end))
```
which is already how `raw_mod_data` is filtered two lines below.
See `src/modelskill/comparison/_comparison.py` around line 855.
Contributor guide
Assessment
This issue has not been assessed yet.