Skip to content

Conversation

@xinrong-meng
Copy link
Contributor

@xinrong-meng xinrong-meng commented Mar 4, 2021

    >>> ks.date_range(start='1/1/2018', end='1/08/2018')
    DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04',
                   '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'],
                  dtype='datetime64[ns]', freq=None)

    Specify `start` and `periods`, the number of periods (days).

    >>> ks.date_range(start='1/1/2018', periods=8)
    DatetimeIndex(['2018-01-01', '2018-01-02', '2018-01-03', '2018-01-04',
                   '2018-01-05', '2018-01-06', '2018-01-07', '2018-01-08'],
                  dtype='datetime64[ns]', freq=None)

Please note that currently, we cannot handle freq properly, this is a known issue.

Examples
--------
>>> idx = ks.from_pandas(pd.date_range('2016-12-31', '2017-01-08', freq='D'))
>>> idx = ks.date_range('2016-12-31', '2017-01-08', freq='D')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, except for the style issue, also pending tests.

@ueshin
Copy link
Collaborator

ueshin commented Mar 4, 2021

Thanks! merging.

@ueshin ueshin merged commit 9150ca4 into databricks:master Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants