学习是最好的投资!
"b'10/31/2016'" は str、b'10/31/2016' は文字列 '10/31/2016' の binary 形式なので、データを処理しましょう。loadtxt で converters パラメーターを使用できます。 re.sub("b|'", '', first_field) b 内の ' を置き換えて、日付を変換します
"b'10/31/2016'"
str
b'10/31/2016'
binary
loadtxt
converters
re.sub("b|'", '', first_field)
b
'
"b'10/31/2016'"
はstr
、b'10/31/2016'
は文字列 '10/31/2016' のbinary
形式なので、データを処理しましょう。loadtxt
でconverters
パラメーターを使用できます。re.sub("b|'", '', first_field)
b
内の'
を置き換えて、日付を変換します