Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing Datetime and using it as index #209

Open
trueToastedCode opened this issue Feb 18, 2023 · 0 comments
Open

Parsing Datetime and using it as index #209

trueToastedCode opened this issue Feb 18, 2023 · 0 comments

Comments

@trueToastedCode
Copy link

trueToastedCode commented Feb 18, 2023

This would be the Python equivalent

import pandas as pd

df.Datetime = pd.to_datetime(df.Datetime, format='%Y-%m-%d %H:%M:%S')
df.set_index('Datetime', inplace=True)

btw i also have another DataFrame I need to join based the index of Datetime....

another_df = pd.to_datetime(another_df.Datetime, format='%Y-%m-%d %H:%M:%S') 
another_df.set_index('Datetime', inplace=True)
df = df.join(another_df)
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

No branches or pull requests

1 participant