Skip to content

Instantly share code, notes, and snippets.

@MajoroMask
Created October 7, 2023 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MajoroMask/9c7f164ce42a9f99c537c60254f39a53 to your computer and use it in GitHub Desktop.
Save MajoroMask/9c7f164ce42a9f99c537c60254f39a53 to your computer and use it in GitHub Desktop.
Error message from `taxpasta merge`
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /usr/local/lib/python3.11/site-packages/taxpasta/infrastructure/cli/merge.py │
│ :448 in merge │
│ │
│ 445 │ │ logger.critical("Less than two profiles are without errors. No │
│ 446 │ │ raise typer.Exit(code=1) │
│ 447 │ │
│ ❱ 448 │ result = handling_app.merge_samples(samples, wide_format) │
│ 449 │ │
│ 450 │ if valid_output_format is not WideObservationTableFileFormat.BIOM: │
│ 451 │ │ result = command.execute(result) │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ add_id_lineage = False │ │
│ │ add_lineage = False │ │
│ │ add_name = False │ │
│ │ add_rank = False │ │
│ │ add_rank_lineage = False │ │
│ │ command = AddTaxInfoCommand( │ │
│ │ │ taxonomy_service=None, │ │
│ │ │ summarise_at=None, │ │
│ │ │ add_name=False, │ │
│ │ │ add_rank=False, │ │
│ │ │ add_lineage=False, │ │
│ │ │ add_id_lineage=False, │ │
│ │ │ add_rank_lineage=False │ │
│ │ ) │ │
│ │ data = [ │ │
│ │ │ ( │ │
│ │ │ │ '2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ │
│ │ PosixPath('2613_se_metaphlan4-db.metaphlan_profil… │ │
│ │ │ ), │ │
│ │ │ ( │ │
│ │ │ │ '2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ │
│ │ PosixPath('2612_se_metaphlan4-db.metaphlan_profil… │ │
│ │ │ ), │ │
│ │ │ ( │ │
│ │ │ │ │ │
│ │ 'ERR3201952_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ │
│ │ PosixPath('ERR3201952_se_metaphlan4-db.metaphlan_… │ │
│ │ │ ), │ │
│ │ │ ( │ │
│ │ │ │ '2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ │
│ │ PosixPath('2611_se_metaphlan4-db.metaphlan_profil… │ │
│ │ │ ) │ │
│ │ ] │ │
│ │ handling_app = <taxpasta.application.sample_handling_application… │ │
│ │ object at 0x7f80bba3b5d0> │ │
│ │ ignore_errors = False │ │
│ │ name = '2611_se_metaphlan4-db.metaphlan_profile' │ │
│ │ output = PosixPath('metaphlan_metaphlan4-db.tsv') │ │
│ │ output_format = None │ │
│ │ profile = PosixPath('2611_se_metaphlan4-db.metaphlan_profil… │ │
│ │ profiler = <SupportedProfiler.metaphlan: 'metaphlan'> │ │
│ │ profiles = [ │ │
│ │ │ │ │
│ │ PosixPath('2613_se_metaphlan4-db.metaphlan_profil… │ │
│ │ │ │ │
│ │ PosixPath('2612_se_metaphlan4-db.metaphlan_profil… │ │
│ │ │ │ │
│ │ PosixPath('ERR3201952_se_metaphlan4-db.metaphlan_… │ │
│ │ │ │ │
│ │ PosixPath('2611_se_metaphlan4-db.metaphlan_profil… │ │
│ │ ] │ │
│ │ sample_sheet = None │ │
│ │ samples = [ │ │
│ │ │ Sample( │ │
│ │ │ │ │ │
│ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ │ │
│ │ name='2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 91006100 │ │
│ │ 1 2157 8993900 │ │
│ │ 2 976 31324920 │ │
│ │ 3 201174 29874050 │ │
│ │ 4 1239 28333370 │ │
│ │ .. ... ... │ │
│ │ 76 1907654 79560 │ │
│ │ 77 1944646 76140 │ │
│ │ 78 2292441 67710 │ │
│ │ 79 418240 10060 │ │
│ │ 80 0 225368470 │ │
│ │ │ │
│ │ [81 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ │ │
│ │ name='ERR3201952_se_metaphlan4-db.metaphlan_profi… │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 0 100000000 │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ │ │
│ │ name='2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 100000000 │ │
│ │ 1 1239 100000000 │ │
│ │ 2 186801 100000000 │ │
│ │ 3 186802 100000000 │ │
│ │ 4 31979 100000000 │ │
│ │ 5 1485 100000000 │ │
│ │ 6 2763037 100000000 │ │
│ │ 7 0 100000000 │ │
│ │ │ ) │ │
│ │ ] │ │
│ │ samplesheet_format = None │ │
│ │ summarise_at = None │ │
│ │ taxonomy = None │ │
│ │ taxonomy_service = None │ │
│ │ valid_output_format = <WideObservationTableFileFormat.TSV: 'TSV'> │ │
│ │ wide_format = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/site-packages/taxpasta/application/sample_handling │
│ _application.py:133 in merge_samples │
│ │
│ 130 │ │ │
│ 131 │ │ """ │
│ 132 │ │ if wide_format: │
│ ❱ 133 │ │ │ wide_table = SampleMergingService.merge_wide(samples) │
│ 134 │ │ │ # If any profile did not have all the same taxonomy IDs as │
│ 135 │ │ │ # table, additional zeroes were introduced. │
│ 136 │ │ │ if any( │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ samples = [ │ │
│ │ │ Sample( │ │
│ │ │ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ name='2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 91006100 │ │
│ │ 1 2157 8993900 │ │
│ │ 2 976 31324920 │ │
│ │ 3 201174 29874050 │ │
│ │ 4 1239 28333370 │ │
│ │ .. ... ... │ │
│ │ 76 1907654 79560 │ │
│ │ 77 1944646 76140 │ │
│ │ 78 2292441 67710 │ │
│ │ 79 418240 10060 │ │
│ │ 80 0 225368470 │ │
│ │ │ │
│ │ [81 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ │ │
│ │ name='ERR3201952_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 0 100000000 │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ name='2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 100000000 │ │
│ │ 1 1239 100000000 │ │
│ │ 2 186801 100000000 │ │
│ │ 3 186802 100000000 │ │
│ │ 4 31979 100000000 │ │
│ │ 5 1485 100000000 │ │
│ │ 6 2763037 100000000 │ │
│ │ 7 0 100000000 │ │
│ │ │ ) │ │
│ │ ] │ │
│ │ self = <taxpasta.application.sample_handling_application.SampleH… │ │
│ │ object at 0x7f80bba3b5d0> │ │
│ │ wide_format = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/site-packages/pandera/decorators.py:754 in │
│ _wrapper │
│ │
│ 751 │ │ │ │ validated_pos, validated_kwd = validate_inputs( │
│ 752 │ │ │ │ │ instance, args, kwargs │
│ 753 │ │ │ │ ) │
│ ❱ 754 │ │ │ │ out = wrapped_(*validated_pos.values(), **validated_kw │
│ 755 │ │ │ return _check_arg("return", out) │
│ 756 │ │
│ 757 │ wrapped_fn = _wrapper(wrapped) # pylint:disable=no-value-for-para │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ _check_arg = <function check_types.<locals>._check_arg at │ │
│ │ 0x7f80bbbce3e0> │ │
│ │ args = ( │ │
│ │ │ [ │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 91006100 │ │
│ │ 1 2157 8993900 │ │
│ │ 2 976 31324920 │ │
│ │ 3 201174 29874050 │ │
│ │ 4 1239 28333370 │ │
│ │ .. ... ... │ │
│ │ 76 1907654 79560 │ │
│ │ 77 1944646 76140 │ │
│ │ 78 2292441 67710 │ │
│ │ 79 418240 10060 │ │
│ │ 80 0 225368470 │ │
│ │ │ │
│ │ [81 rows x 2 columns] │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='ERR3201952_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 0 100000000 │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 100000000 │ │
│ │ 1 1239 100000000 │ │
│ │ 2 186801 100000000 │ │
│ │ 3 186802 100000000 │ │
│ │ 4 31979 100000000 │ │
│ │ 5 1485 100000000 │ │
│ │ 6 2763037 100000000 │ │
│ │ 7 0 100000000 │ │
│ │ │ │ ) │ │
│ │ │ ], │ │
│ │ ) │ │
│ │ instance = <class │ │
│ │ 'taxpasta.domain.service.sample_merging_service.Sampl… │ │
│ │ kwargs = {} │ │
│ │ validate_inputs = <function check_types.<locals>.validate_inputs at │ │
│ │ 0x7f80bbbce520> │ │
│ │ validated_kwd = {} │ │
│ │ validated_pos = { │ │
│ │ │ 'samples': [ │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 91006100 │ │
│ │ 1 2157 8993900 │ │
│ │ 2 976 31324920 │ │
│ │ 3 201174 29874050 │ │
│ │ 4 1239 28333370 │ │
│ │ .. ... ... │ │
│ │ 76 1907654 79560 │ │
│ │ 77 1944646 76140 │ │
│ │ 78 2292441 67710 │ │
│ │ 79 418240 10060 │ │
│ │ 80 0 225368470 │ │
│ │ │ │
│ │ [81 rows x 2 columns] │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='ERR3201952_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 0 100000000 │ │
│ │ │ │ ), │ │
│ │ │ │ Sample( │ │
│ │ │ │ │ │ │
│ │ name='2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 100000000 │ │
│ │ 1 1239 100000000 │ │
│ │ 2 186801 100000000 │ │
│ │ 3 186802 100000000 │ │
│ │ 4 31979 100000000 │ │
│ │ 5 1485 100000000 │ │
│ │ 6 2763037 100000000 │ │
│ │ 7 0 100000000 │ │
│ │ │ │ ) │ │
│ │ │ ] │ │
│ │ } │ │
│ │ with_pydantic = False │ │
│ │ wrapped_ = <bound method SampleMergingService.merge_wide of │ │
│ │ <class │ │
│ │ 'taxpasta.domain.service.sample_merging_service.Sampl… │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/site-packages/taxpasta/domain/service/sample_mergi │
│ ng_service.py:52 in merge_wide │
│ │
│ 49 │ │ """ │
│ 50 │ │ # `set_index` creates a copy of the original profile which is │
│ 51 │ │ # we do not modify existing profiles but, of course, doubles t │
│ ❱ 52 │ │ counts = [ │
│ 53 │ │ │ sample.profile.set_index( │
│ 54 │ │ │ │ keys=StandardProfile.taxonomy_id, verify_integrity=Tru │
│ 55 │ │ │ ).rename(columns={StandardProfile.count: sample.name}) │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ cls = <class │ │
│ │ 'taxpasta.domain.service.sample_merging_service.SampleMerging… │ │
│ │ samples = [ │ │
│ │ │ Sample( │ │
│ │ │ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ name='2612_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 91006100 │ │
│ │ 1 2157 8993900 │ │
│ │ 2 976 31324920 │ │
│ │ 3 201174 29874050 │ │
│ │ 4 1239 28333370 │ │
│ │ .. ... ... │ │
│ │ 76 1907654 79560 │ │
│ │ 77 1944646 76140 │ │
│ │ 78 2292441 67710 │ │
│ │ 79 418240 10060 │ │
│ │ 80 0 225368470 │ │
│ │ │ │
│ │ [81 rows x 2 columns] │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ name='ERR3201952_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 0 100000000 │ │
│ │ │ ), │ │
│ │ │ Sample( │ │
│ │ │ │ name='2611_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ │ profile= taxonomy_id count │ │
│ │ 0 2 100000000 │ │
│ │ 1 1239 100000000 │ │
│ │ 2 186801 100000000 │ │
│ │ 3 186802 100000000 │ │
│ │ 4 31979 100000000 │ │
│ │ 5 1485 100000000 │ │
│ │ 6 2763037 100000000 │ │
│ │ 7 0 100000000 │ │
│ │ │ ) │ │
│ │ ] │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/site-packages/taxpasta/domain/service/sample_mergi │
│ ng_service.py:53 in <listcomp> │
│ │
│ 50 │ │ # `set_index` creates a copy of the original profile which is │
│ 51 │ │ # we do not modify existing profiles but, of course, doubles t │
│ 52 │ │ counts = [ │
│ ❱ 53 │ │ │ sample.profile.set_index( │
│ 54 │ │ │ │ keys=StandardProfile.taxonomy_id, verify_integrity=Tru │
│ 55 │ │ │ ).rename(columns={StandardProfile.count: sample.name}) │
│ 56 │ │ │ for sample in samples │
│ │
│ ╭─────────────────────────── locals ───────────────────────────╮ │
│ │ .0 = <list_iterator object at 0x7f80bbab2d70> │ │
│ │ sample = Sample( │ │
│ │ │ name='2613_se_metaphlan4-db.metaphlan_profile', │ │
│ │ │ profile= taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ ) │ │
│ ╰──────────────────────────────────────────────────────────────╯ │
│ │
│ /usr/local/lib/python3.11/site-packages/pandas/core/frame.py:5933 in │
│ set_index │
│ │
│ 5930 │ │ │
│ 5931 │ │ if verify_integrity and not index.is_unique: │
│ 5932 │ │ │ duplicates = index[index.duplicated()].unique() │
│ ❱ 5933 │ │ │ raise ValueError(f"Index has duplicate keys: {duplicates │
│ 5934 │ │ │
│ 5935 │ │ # use set to handle duplicate column names gracefully in cas │
│ 5936 │ │ for c in set(to_remove): │
│ │
│ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
│ │ append = False │ │
│ │ arrays = [ │ │
│ │ │ 0 2 │ │
│ │ 1 2157 │ │
│ │ 2 28890 │ │
│ │ 3 201174 │ │
│ │ 4 1239 │ │
│ │ │ ... │ │
│ │ 59 1852370 │ │
│ │ 60 335952 │ │
│ │ 61 88431 │ │
│ │ 62 1776391 │ │
│ │ 63 0 │ │
│ │ Name: taxonomy_id, Length: 64, dtype: category │ │
│ │ Categories (62, Int64): [0, 2, 468, 469, ..., │ │
│ │ 2003188, 2082587, 2292893, 2887326] │ │
│ │ ] │ │
│ │ col = 'taxonomy_id' │ │
│ │ drop = True │ │
│ │ duplicates = CategoricalIndex([165179], categories=[0, 2, 468, │ │
│ │ 469, ..., 2003188, 2082587, 2292893, 2887326], │ │
│ │ ordered=False, dtype='category', name='taxonomy_id') │ │
│ │ err_msg = 'The parameter "keys" may be a column key, │ │
│ │ one-dimensional array, or a list conta'+56 │ │
│ │ found = True │ │
│ │ frame = taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ index = CategoricalIndex([ 2, 2157, 28890, 201174, │ │
│ │ 1239, 976, │ │
│ │ │ │ │ │ 544448, 1224, 183963, 84998, │ │
│ │ 186801, 200643, │ │
│ │ │ │ │ │ │ 1760, 183925, 91061, 1236, │ │
│ │ 2235, 84999, │ │
│ │ │ │ │ │ 186802, 171549, 85004, 2158, │ │
│ │ 1643822, 186826, │ │
│ │ │ │ │ │ 2887326, 1963270, 84107, 171552, │ │
│ │ 216572, 186803, │ │
│ │ │ │ │ │ │ 31953, 2159, 1643826, 1643824, │ │
│ │ 33958, 468, │ │
│ │ │ │ │ │ │ 2249, 838, 1263, 102106, │ │
│ │ 841, 1678, │ │
│ │ │ │ │ │ │ 2172, 2082587, 1926672, 189330, │ │
│ │ 469, 2250, │ │
│ │ │ │ │ │ 165179, 40518, 301302, 1680, │ │
│ │ 2173, 2292893, │ │
│ │ │ │ │ │ 2003188, 165179, 165179, 39491, │ │
│ │ 74426, 1852370, │ │
│ │ │ │ │ │ 335952, 88431, 1776391, │ │
│ │ 0], │ │
│ │ │ │ │ │ categories=[0, 2, 468, 469, ..., │ │
│ │ 2003188, 2082587, 2292893, 2887326], ordered=False, │ │
│ │ dtype='category', name='taxonomy_id') │ │
│ │ inplace = False │ │
│ │ keys = ['taxonomy_id'] │ │
│ │ missing = [] │ │
│ │ names = ['taxonomy_id'] │ │
│ │ self = taxonomy_id count │ │
│ │ 0 2 69129670 │ │
│ │ 1 2157 30870330 │ │
│ │ 2 28890 30870330 │ │
│ │ 3 201174 26692960 │ │
│ │ 4 1239 21846160 │ │
│ │ .. ... ... │ │
│ │ 59 1852370 847240 │ │
│ │ 60 335952 707120 │ │
│ │ 61 88431 227620 │ │
│ │ 62 1776391 191180 │ │
│ │ 63 0 181382907 │ │
│ │ │ │
│ │ [64 rows x 2 columns] │ │
│ │ to_remove = ['taxonomy_id'] │ │
│ │ verify_integrity = True │ │
│ ╰──────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────╯
ValueError: Index has duplicate keys: CategoricalIndex([165179], categories=[0,
2, 468, 469, ..., 2003188, 2082587, 2292893, 2887326], ordered=False,
dtype='category', name='taxonomy_id')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment