Skip to content

Instantly share code, notes, and snippets.

@northface
Last active June 20, 2017 13:24
Show Gist options
  • Save northface/c3131aab27ca1bb198276f5bac8c693b to your computer and use it in GitHub Desktop.
Save northface/c3131aab27ca1bb198276f5bac8c693b to your computer and use it in GitHub Desktop.
CSV読み込み時に文字列の日付を解読する
#parse_datesをで対象の列を指定すると文字列の20170601を2017-06-01の日付型にしてくれる
import pandas as pd
df_pic = pd.read_csv("data/社員マスタ.csv",index_col="社員コード", parse_dates=['入社日付'] )
df_pic.info()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment