@@ -282,38 +282,44 @@ def to_hdf(path_or_buf, key, value, mode=None, complevel=None, complib=None,
282282
283283
284284def read_hdf (path_or_buf , key = None , mode = 'r' , ** kwargs ):
285- """ read from the store, close it if we opened it
286-
287- Retrieve pandas object stored in file, optionally based on where
288- criteria
289-
290- Parameters
291- ----------
292- path_or_buf : path (string), buffer or path object (pathlib.Path or
293- py._path.local.LocalPath) designating the file to open, or an
294- already opened pd.HDFStore object
295-
296- .. versionadded:: 0.19.0 support for pathlib, py.path.
285+ """
286+ Read from the store, close it if we opened it
297287
298- key : group identifier in the store. Can be omitted if the HDF file
299- contains a single pandas object.
300- mode : string, {'r', 'r+', 'a'}, default 'r'. Mode to use when opening
301- the file. Ignored if path_or_buf is a pd.HDFStore.
302- where : list of Term (or convertible) objects, optional
303- start : optional, integer (defaults to None), row number to start
304- selection
305- stop : optional, integer (defaults to None), row number to stop
306- selection
307- columns : optional, a list of columns that if not None, will limit the
308- return columns
309- iterator : optional, boolean, return an iterator, default False
310- chunksize : optional, nrows to include in iteration, return an iterator
288+ Retrieve pandas object stored in file, optionally based on where
289+ criteria
311290
312- Returns
313- -------
314- The selected object
291+ Parameters
292+ ----------
293+ path_or_buf : string, buffer or path object
294+ Path to the file to open, or an open pd.HDFStore object.
295+ Supports pathlib.Path and py._path.local.LocalPath.
296+
297+ .. versionadded:: 0.19.0 support for pathlib, py.path.
298+
299+ key : object, optional
300+ The group identifier in the store. Can be omitted if the HDF file
301+ contains a single pandas object.
302+ mode : {'r', 'r+', 'a'}, optional
303+ Mode to use when opening the file. Ignored if path_or_buf is a
304+ pd.HDFStore. Default is 'r'.
305+ where : list, optional
306+ A list of Term (or convertible) objects
307+ start : int, optional
308+ Row number to start selection
309+ stop : int, optional
310+ Row number to stop selection
311+ columns : list, optional
312+ A list of columns names to return
313+ iterator : bool, optional
314+ Return an iterator object
315+ chunksize : int, optional
316+ nrows to include in an iteration when using an iterator
315317
316- """
318+ Returns
319+ -------
320+ item : object
321+ The selected object. Return type depends on the object stored.
322+ """
317323
318324 if mode not in ['r' , 'r+' , 'a' ]:
319325 raise ValueError ('mode {0} is not allowed while performing a read. '
0 commit comments