Skip to content

Instantly share code, notes, and snippets.

@Seanny123
Created June 26, 2019 15:37
Show Gist options
  • Save Seanny123/e3b8720a20d2b9b869d6c26bc2ebafcf to your computer and use it in GitHub Desktop.
Save Seanny123/e3b8720a20d2b9b869d6c26bc2ebafcf to your computer and use it in GitHub Desktop.
Parse CSV with DateTimeIndex
date_col = "datetime"
data_col = "data"
filename = "whatevs.csv"
in_df = pd.read_csv(filename,
usecols=[date_col, data_col],
infer_datetime_format=True, index_col=data_col, parse_dates=data_col)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment