Skip to content

Commit 6da4a80

Browse files
adamjoshuagrayfemtotrader
authored andcommitted
BUG: Yahoo Options - added format specifier so that the date is parsed correctly regardless of locale (#203)
1 parent a7d9464 commit 6da4a80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas_datareader/yahoo/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def _process_data(self, frame, type):
677677
frame.columns = ['Strike', 'Symbol', 'Last', 'Bid', 'Ask', 'Chg', 'PctChg', 'Vol', 'Open_Int', 'IV']
678678
frame["Rootexp"] = frame.Symbol.str[0:-9]
679679
frame["Root"] = frame.Rootexp.str[0:-6]
680-
frame["Expiry"] = to_datetime(frame.Rootexp.str[-6:])
680+
frame["Expiry"] = to_datetime(frame.Rootexp.str[-6:], format='%y%m%d')
681681
# Removes dashes in equity ticker to map to option ticker.
682682
# Ex: BRK-B to BRKB140517C00100000
683683
frame["IsNonstandard"] = frame['Root'] != self.symbol.replace('-', '')

0 commit comments

Comments
 (0)