Skip to content

strling-outliers.py: Incompatibility with newer Pandas version #119

Description

@ryanmcggg

Hello
It looks like the strling-outliers.py script uses a Pandas indexing functionality that is no longer supported.
I currently have Pandas 2.0.3, which I believe conda installed automatically following the strling instructions.
It looks like you will have to re-write the pandas indexing to keep up to date.
In the meantime, can you tell me which version of pandas you are using so that I can downgrade?
Thanks!
Error log below:

Elapsed time: 5:44:18 Calculating z scores
Traceback (most recent call last):
File "/ENVIRONMENT_PATH/bin/strling-outliers.py", line 459, in
main()
File "/ENVIRONMENT_PATH/bin/strling-outliers.py", line 340, in main
z = z_score(sum_str_log_wide, mu_sd_estimates)
File "/ENVIRONMENT_PATH/bin/strling-outliers.py", line 141, in z_score
return (x - df['mu'][:,np.newaxis])/df['sd'][:,np.newaxis]
File "/ENVIRONMENT_PATH/lib/python3.8/site-packages/pandas/core/series.py", line 1033, in getitem
return self._get_with(key)
File "/ENVIRONMENT_PATH/lib/python3.8/site-packages/pandas/core/series.py", line 1048, in _get_with
return self._get_values_tuple(key)
File "/ENVIRONMENT_PATH/lib/python3.8/site-packages/pandas/core/series.py", line 1082, in _get_values_tuple
disallow_ndim_indexing(result)
File "/ENVIRONMENT_PATH/lib/python3.8/site-packages/pandas/core/indexers/utils.py", line 343, in disallow_ndim_indexing
raise ValueError(
ValueError: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions