2
df1 = df1[df1['TIME STAMP'].between('2021-01-27 00:00:00', '2021-10-10 23:59:59')]

The above code is selecting a dataframe from two specific dates and it works fine.

I want to select a from date and to date (infinity/the last date of dataframe) or any option to select only from date.

1 Answer 1

1

You can use comparison operators between timestamps:

import pandas as pd

df1 = df1[df1['TIME STAMP'] >= pd.Timestamp('2021-01-27 00:00:00')]
Sign up to request clarification or add additional context in comments.

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.