, anndata=False, columns_obs_only=None)[source]#

Loads the MIMIC-III demo dataset as a dictionary of Pandas DataFrames.

The MIMIC-III dataset comes in the form of 26 CSV tables. Although, it is possible to return one AnnData object per csv table, it might be easier to start with Pandas DataFrames to aggregate the desired measurements with Pandas SQL. might be useful. The resulting DataFrame can then be transformed into an AnnData object with df_to_anndata().

  • encoded (bool) – Whether to return an already encoded object.

  • anndata (bool) – Whether to return one AnnData object per CSV file. Defaults to False

  • columns_obs_only (dict[str, list[str]] | list[str] | None) – Columns to include in obs only and not X.

Return type:

dict[str, AnnData] | dict[str, DataFrame]


A dictionary of AnnData objects or a dictionary of Pandas DataFrames


>>> import ehrapy as ep
>>> dfs = ep.dt.mimic_3_demo()