nimare.utils.dict_to_df

dict_to_df(id_df, data, key='labels')[source]

Load a given data type in NIMADS-format dictionary into DataFrame.

Parameters
  • id_df (pandas.DataFrame) – DataFrame with columns for identifiers. Index is [studyid]-[expid].

  • data (dict) – NIMADS-format dictionary storing the raw dataset, from which relevant data are loaded into DataFrames.

  • key ({‘labels’, ‘metadata’, ‘text’, ‘images’}) – Which data type to load.

Returns

df (pandas.DataFrame) – DataFrame with id columns from id_df and new columns for the requested data type.