Skip to content

Commit

Permalink
CLN: replace %s syntax with .format in pandas.io (#24719)
Browse files Browse the repository at this point in the history
progress towards #16130
  • Loading branch information
makeajourney authored and jreback committed Jan 11, 2019
1 parent e2b2068 commit 3fe28fc
Show file tree
Hide file tree
Showing 5 changed files with 203 additions and 146 deletions.
3 changes: 2 additions & 1 deletion pandas/io/packers.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ def encode(obj):
elif isinstance(obj, date):
return {u'typ': u'date',
u'data': u(obj.isoformat())}
raise Exception("cannot encode this datetimelike object: %s" % obj)
raise Exception(
"cannot encode this datetimelike object: {obj}".format(obj=obj))
elif isinstance(obj, Period):
return {u'typ': u'period',
u'ordinal': obj.ordinal,
Expand Down
Loading

0 comments on commit 3fe28fc

Please sign in to comment.