Skip to content

LiverPDO Experiments Failing in build process #432

@jjacobson95

Description

@jjacobson95

Integer casting led to an issue, fixing on build branch
Error received:

File "/app/04-experiments-liverpdo.py", line 174, in <module>
    experiments_df = merge_improve_samples_drugs(experiment_data = parsed_experiments_data, samples_data_path = args.Samples, improve_drugs_path = args.Drugs, drugs_info_path="/tmp/4_Drug_information.xlsx")
  File "/app/04-experiments-liverpdo.py", line 131, in merge_improve_samples_drugs
    all_merged = all_merged.astype({'improve_sample_id':'int'})
  File "/usr/local/lib/python3.10/site-packages/pandas/core/generic.py", line 6639, in astype
    res_col = col.astype(dtype=cdt, copy=copy, errors=errors)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/generic.py", line 6662, in astype
    new_data = self._mgr.astype(dtype=dtype, copy=copy, errors=errors)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 430, in astype
    return self.apply(
  File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 363, in apply
    applied = getattr(b, f)(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/internals/blocks.py", line 784, in astype
    new_values = astype_array_safe(values, dtype, copy=copy, errors=errors)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/dtypes/astype.py", line 237, in astype_array_safe
    new_values = astype_array(values, dtype, copy=copy)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/dtypes/astype.py", line 182, in astype_array
    values = _astype_nansafe(values, dtype, copy=copy)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/dtypes/astype.py", line 101, in _astype_nansafe
    return _astype_float_to_int_nansafe(arr, dtype, copy)
  File "/usr/local/lib/python3.10/site-packages/pandas/core/dtypes/astype.py", line 145, in _astype_float_to_int_nansafe
    raise IntCastingNaNError(
pandas.errors.IntCastingNaNError: Cannot convert non-finite values (NA or inf) to integer: Error while type casting for column 'improve_sample_id'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy