From 1d66461eb8909b256381dd106babe90df4afdc55 Mon Sep 17 00:00:00 2001 From: Evan Rosen Date: Wed, 5 Dec 2012 18:10:36 -0800 Subject: [PATCH] deletes a line which should have been deleted when switching to using pandas and changes docstring --- gcat/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gcat/__init__.py b/gcat/__init__.py index 0665805..c3bf794 100755 --- a/gcat/__init__.py +++ b/gcat/__init__.py @@ -57,9 +57,9 @@ def get_file(title, fmt='dict', **kwargs): If keyword argument sheet_name or sheet_id is given, returns only specified sheet. The `fmt` keyword argument determines the format of the return value. Here is the list of accepted formats and the corresponding return value type: - * `dict` : list of dicts (Default). - * `xlrd` : xlrd.Book (only full workbook is exported) - * `list` : list of lists + * `dict` : list of dicts (Default). + * `xlrd` : xlrd.Book (only full workbook is exported) + * `list` : list of lists * `pandas_excel` : Pandas.ExcelFile, usefule for custom parsing For all formats other than `xlrd`, if no sheet name is given, get_file returns a dict with sheet names as keys and accordingly formatted rows as values. @@ -81,7 +81,6 @@ def get_file(title, fmt='dict', **kwargs): except: logger.exception('error parsing worksheet using pandas.ExcelFile.parse(sheet_name). ' 'Consider using pandas_excel and parsing the file yourself to have more control') - parsed_wb = parse(wb, opts) if fmt == 'list': fmt_wb = {name : list(df.itertuples()) for name, df in parsed_wb.items()} elif fmt == 'dict':