ehrapy.anndata.replace_feature_types¶
- ehrapy.anndata.replace_feature_types(adata, features, corrected_type)[source]¶
Correct the feature types for a list of features inplace.
- Parameters:
Examples
>>> import ehrapy as ep >>> adata = ep.dt.diabetes_130_fairlearn() >>> ep.ad.infer_feature_types(adata) >>> ep.ad.replace_feature_types(adata, ["time_in_hospital", "number_diagnoses", "num_procedures"], "numeric")