def load_camera_metadata(camera_metadata_path): data = pd.read_csv(camera_metadata_path) cameras_metadata_dict = data.to_dict('records') return cameras_metadata_dict code example
Example: dataframe to dictionary
>>> df.to_dict('records')
[{'col1': 1, 'col2': 0.5}, {'col1': 2, 'col2': 0.75}]