Skip to content
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

Pandas update to 1.1 breaks load_PfamScan_results_dataframe #1

Closed
tderond opened this issue Sep 4, 2020 · 2 comments
Closed

Pandas update to 1.1 breaks load_PfamScan_results_dataframe #1

tderond opened this issue Sep 4, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tderond
Copy link
Owner

tderond commented Sep 4, 2020

A user reached out describing an error they encountered:

<ipython-input-2-a0f501c7cad3> in load_PfamScan_results_dataframe(input_filename, verbose)
     11     if(verbose):
     12         print("loading "+input_filename)
---> 13     pfamscan_results_df=pandas.read_table(input_filename,
     14                                           delim_whitespace=True,
     15 #                                           dtype="str",

/ichec/work/nglif033c/miniconda3/envs/CO-ED/lib/python3.8/site-packages/pandas/io/parsers.py in read_table(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision)
    753     float_precision=None,
    754 ):
--> 755     return read_csv(**locals())
    756 
    757 

/ichec/work/nglif033c/miniconda3/envs/CO-ED/lib/python3.8/site-packages/pandas/io/parsers.py in read_csv(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, cache_dates, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision)
    622 
    623     if delim_whitespace and delimiter != default_sep:
--> 624         raise ValueError(
    625             "Specified a delimiter with both sep and "
    626             "delim_whitespace=True; you can only specify one."

ValueError: Specified a delimiter with both sep and delim_whitespace=True; you can only specify one.

I could initially not replicate the error, but upon updating pandas from 1.0.3 to 1.1.1, I could.

@tderond tderond added the bug Something isn't working label Sep 4, 2020
@tderond tderond self-assigned this Sep 4, 2020
@tderond
Copy link
Owner Author

tderond commented Sep 5, 2020

This seems to be a bug in pandas: pandas-dev/pandas#35958

@tderond
Copy link
Owner Author

tderond commented Sep 5, 2020

For now, replacing read_table in the load_PfamScan_results_dataframe function with read_csv (not changing anything else) seems to work as a workaround. Depending on how quickly this gets fixed on the Pandas side I may want to implement that fix here in the main branch.

tderond added a commit that referenced this issue Sep 5, 2020
IF YOU USE PANDAS v1.1.1, PLEASE NOTE THIS BUG AND WORKAROUND: #1 (comment)
tderond added a commit that referenced this issue Sep 5, 2020
IF YOU USE PANDAS v1.1.1, PLEASE NOTE THIS BUG AND WORKAROUND: #1 (comment)
tderond added a commit that referenced this issue Sep 13, 2020
@tderond tderond closed this as completed Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant