Skip to content

Commit

Permalink
Set the default mode to 'r' in read_hdf
Browse files Browse the repository at this point in the history
  • Loading branch information
frexvahi committed Jun 6, 2017
1 parent 58176d6 commit 4ed1950
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pandas/io/pytables.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def read_hdf(path_or_buf, key=None, **kwargs):
"""

if kwargs.get('mode', 'a') not in ['r', 'r+', 'a']:
if kwargs.setdefault('mode', 'r') not in ['r', 'r+', 'a']:
raise ValueError('mode {0} is not allowed while performing a read. '
'Allowed modes are r, r+ and a.'
.format(kwargs.get('mode')))
Expand Down

0 comments on commit 4ed1950

Please sign in to comment.