[BUG] date_range support for computed parameters
- Dominant language
- C++
- Stars
- 9.8k
- Forks
- 1.1k
- Avg merge
- 3d 6m
- Merged PRs (30d)
- 278
Description
**Is your feature request related to a problem? Please describe.**
rewriting code with `import cudf as pd`
**Describe the solution you'd like**
implementation of `cudf.date_range` that matches https://pandas.pydata.org/docs/reference/api/pandas.date_range.html
specifically the ability to compute missing parameters
```
>>> import cudf as pd
>>> pd.__version__
'22.12.01'
>>> pd.date_range(100, periods=42)
Traceback (most recent call last):
File "", line 1, in
File ".../python3.8/site-packages/cudf/core/tools/datetimes.py", line 820, in date_range
raise ValueError(
ValueError: Of the four parameters: start, end, periods, and freq, exactly three must be specified
>>> import pandas
>>> pandas.date_range(100, periods=42)
DatetimeIndex(['1970-01-01 00:00:00.000000100',
'1970-01-02 00:00:00.000000100',
'1970-01-03 00:00:00.000000100',
'1970-01-04 00:00:00.000000100',
'1970-01-05 00:00:00.000000100',
'1970-01-06 00:00:00.000000100',
'1970-01-07 00:00:00.000000100',
'1970-01-08 00:00:00.000000100',
'1970-01-09 00:00:00.000000100',
'1970-01-10 00:00:00.000000100',
'1970-01-11 00:00:00.000000100',
'1970-01-12 00:00:00.000000100',
'1970-01-13 00:00:00.000000100',
'1970-01-14 00:00:00.000000100',
'1970-01-15 00:00:00.000000100',
'1970-01-16 00:00:00.000000100',
'1970-01-17 00:00:00.000000100',
'1970-01-18 00:00:00.000000100',
'1970-01-19 00:00:00.000000100',
'1970-01-20 00:00:00.000000100',
'1970-01-21 00:00:00.000000100',
'1970-01-22 00:00:00.000000100',
'1970-01-23 00:00:00.000000100',
'1970-01-24 00:00:00.000000100',
'1970-01-25 00:00:00.000000100',
'1970-01-26 00:00:00.000000100',
'1970-01-27 00:00:00.000000100',
'1970-01-28 00:00:00.000000100',
'1970-01-29 00:00:00.000000100',
'1970-01-30 00:00:00.000000100',
'1970-01-31 00:00:00.000000100',
'1970-02-01 00:00:00.000000100',
'1970-02-02 00:00:00.000000100',
'1970-02-03 00:00:00.000000100',
'1970-02-04 00:00:00.000000100',
'1970-02-05 00:00:00.000000100',
'1970-02-06 00:00:00.000000100',
'1970-02-07 00:00:00.000000100',
'1970-02-08 00:00:00.000000100',
'1970-02-09 00:00:00.000000100',
'1970-02-10 00:00:00.000000100',
'1970-02-11 00:00:00.000000100'],
dtype='datetime64[ns]', freq='D')
```
**Additional context**
gooooooaaaaaallllll!
Contributor guide
Assessment
This issue has not been assessed yet.