Skip to content

read_sas catches own error #24548 #24554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 21 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4446942
DOC: Fix docstrings with the sections in the wrong order #24280
benjaminr Dec 14, 2018
baa2950
DOC: Fix docstrings with the sections in the wrong order #24280
benjaminr Dec 14, 2018
c73c5f0
Removal of whitespace to satisfy flak8 checks.
benjaminr Dec 14, 2018
c042341
Merge branch 'master' of https://github.com/pandas-dev/pandas
benjaminr Dec 16, 2018
14fe729
Refactored _doc_template to _common_see_also and used with the substi…
benjaminr Dec 16, 2018
23350de
Updated CI checks to include GL07 docstring validation.
benjaminr Dec 16, 2018
3d18f6b
Docstring appends were in the wrong order - this corrects that. Altho…
benjaminr Dec 16, 2018
a1db80b
Use of format on _shared_docs['aggregate'] docstring usage to get the…
benjaminr Dec 17, 2018
faac16d
Merge branch 'master' of https://github.com/pandas-dev/pandas
benjaminr Dec 17, 2018
0a7ed6d
Merge branch 'master' of https://github.com/pandas-dev/pandas
benjaminr Dec 18, 2018
64af1fc
Updated to code check order and included GL07 in messages.
benjaminr Dec 18, 2018
3e54918
Use of substitution to clean up docstring order fix.
benjaminr Dec 18, 2018
5f64fcf
Corrected order of see_also and examples string defitions to match do…
benjaminr Dec 18, 2018
bdeb8ae
Updated name of _agg_see_also_doc to reflect fact it also contains a …
benjaminr Dec 18, 2018
fc5fc69
Fix added import statement to be in the correct order.
benjaminr Dec 18, 2018
828c03b
Merge of upstream changes.
benjaminr Dec 26, 2018
91d13fe
Addition of dateutil docs to intersphinx mapping to pull in objects f…
benjaminr Dec 26, 2018
ae6aa27
Reordered listing of mapping to be alphabetical.
benjaminr Dec 26, 2018
464f80d
Merge in recent changes
benjaminr Jan 2, 2019
88a77b0
Raise the ValueError instead of passing.
benjaminr Jan 2, 2019
15bf0f9
Update docstring to describe format inference.
benjaminr Jan 2, 2019
00484cb
Added a test, updated whatsnew and removed superfluous try/except.
benjaminr Jan 2, 2019
8eb839e
Update to whatsnew entry to improve readability.
benjaminr Jan 2, 2019
06a86c4
Removal of trailing whitespace.
benjaminr Jan 2, 2019
c3291c2
Triggering CI, pushed previous as github went down.
benjaminr Jan 2, 2019
0dd9b49
whatsnew
jreback Jan 2, 2019
9012e41
Fixed import order for test.
benjaminr Jan 2, 2019
4839c09
Merge branch 'master' into PR_TOOL_MERGE_PR_24554
jreback Jan 3, 2019
dcc071d
correct doc
jreback Jan 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pandas/io/sas/sasreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def read_sas(filepath_or_buffer, format=None, index=None, encoding=None,
filepath_or_buffer : string or file-like object
Path to the SAS file.
format : string {'xport', 'sas7bdat'} or None
If None, file format is inferred. If 'xport' or 'sas7bdat',
uses the corresponding format.
If None, file format is inferred from file extension. If 'xport' or
'sas7bdat', uses the corresponding format.
index : identifier of index column, defaults to None
Identifier of column that should be used as index of the DataFrame.
encoding : string, default is None
Expand Down Expand Up @@ -48,7 +48,7 @@ def read_sas(filepath_or_buffer, format=None, index=None, encoding=None,
else:
raise ValueError("unable to infer format of SAS file")
except ValueError:
pass
raise

if format.lower() == 'xport':
from pandas.io.sas.sas_xport import XportReader
Expand Down