0

I want to create time index df without date like this:

          2019/10/01  2019/10/02

00:00:00
00:00:01
00:00:02
00:00:03
...
23:59:59

How can I do this df? Thanks

1
  • Can you be more specific about what the issue is? Have you done any research, or tried anything? Commented Jan 29, 2020 at 5:34

2 Answers 2

1

We have date_range , just need using time to only select the time

idx = pd.date_range('2020-01-01', periods=24*60*60, freq='S').time


df.index = idx
Sign up to request clarification or add additional context in comments.

Comments

1

Try using:

df.index = pd.date_range(start='00:00:00', end='23:59:59', freq='S').time

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.