{"id":23874,"library":"idc-index","title":"IDC Index","description":"Python package to simplify access to the data available in the NCI Imaging Data Commons (IDC). Provides queryable Pandas/DuckDB-based indices for DICOM studies, series, and analysis results. Latest version: 0.11.14. Released approximately every 2-4 weeks.","status":"active","version":"0.11.14","language":"python","source_language":"en","source_url":"https://github.com/ImagingDataCommons/idc-index","tags":["idc","imaging","dicom","nci","cancer","data-commons"],"install":[{"cmd":"pip install idc-index","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Provides the actual index data (parquet tables) loaded by idc-index","package":"idc-index-data","optional":false},{"reason":"Used internally for SQL-like queries on the indices","package":"duckdb","optional":false},{"reason":"Used to represent query results as DataFrames","package":"pandas","optional":false}],"imports":[{"note":"Client class is exposed at the top-level package since v0.10.","wrong":"from idc_index.client import IDCClient","symbol":"IDCClient","correct":"from idc_index import IDCClient"},{"note":"For programmatic access to the index tables (e.g., index.IndexClient)","symbol":"index","correct":"from idc_index import index"}],"quickstart":{"code":"from idc_index import IDCClient\n\nclient = IDCClient()\n# Get all DICOM series in the index\nseries = client.get_series(collection_id=\"TCGA-LUAD\", modality=\"CT\")\nprint(len(series))\n# Access as Pandas DataFrame\nprint(series.head())","lang":"python","description":"Creates a client, then queries for CT series from the TCGA-LUAD collection."},"warnings":[{"fix":"Replace `client.get_collections()` with `client.available_collections`","message":"The method `get_collections()` was removed in v0.11. Use `client.available_collections` property instead.","severity":"deprecated","affected_versions":">=0.11.0"},{"fix":"client = IDCClient(lazy=True)","message":"IDCClient() will download the index data on first instantiation if not already cached. This can be slow (>1GB download). Use `IDCClient(lazy=True)` to defer downloading until a query is made.","severity":"gotcha","affected_versions":">=0.9.0"},{"fix":"Run `pip install --upgrade idc-index idc-index-data`","message":"Index data (parquet files) is versioned with the `idc-index-data` package. If you have an older version of idc-index-data, new methods may fail or return empty results. Always keep both packages up-to-date.","severity":"gotcha","affected_versions":"all"},{"fix":"Access elements by index (e.g., result.patient_id) instead of dict['patient_id']","message":"In v0.11.0, the `get_patient_study_series()` return format changed from a dict with keys to a namedtuple. Code expecting dict keys will break.","severity":"breaking","affected_versions":">=0.11.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `client.available_collections` instead.","cause":"The method was renamed/removed in v0.11.","error":"AttributeError: 'IDCClient' object has no attribute 'get_collections'"},{"fix":"Run `pip install idc-index-data` or `pip install idc-index --upgrade`.","cause":"The `idc-index-data` package is not installed or not up-to-date.","error":"ModuleNotFoundError: No module named 'idc_index_data'"},{"fix":"Use `not series.empty` instead of `if series:`","cause":"Calling `bool(client.get_series(...))` on an empty DataFrame.","error":"ValueError: The truth value of a DataFrame is ambiguous"},{"fix":"Ensure stable internet, delete `~/.cache/idc-index` and retry, or set environment variable `IDC_INDEX_CACHE_DIR` to a writable path.","cause":"First-time download or cached index is corrupt; or network issue.","error":"RuntimeError: Cannot connect to IDC index. Make sure you have internet access."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}