go-gota / gota

Gota: DataFrames and data wrangling in Go (Golang)
Other
2.97k stars 276 forks source link

Parsing Datetime and using it as index #209

Open trueToastedCode opened 1 year ago

trueToastedCode commented 1 year ago

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)