Skip to content

When a hash_part_table has no secondary attributes, this line breaks since rows_to_hash.to_dict(orient='records') will return [] instead of [{}]. #2

@spapa013

Description

@spapa013

When a hash_part_table has no secondary attributes, this line breaks since rows_to_hash.to_dict(orient='records') will return [] instead of [{}].
hash_part_tables with no secondary attributes can be useful for semantic notations for methods with no parameters, for example:

class AreaMemberShip(djp.Manual):  # table storing a mapping from functional unit keys to brain area
    definition = """
    -> fuse.ScanSet.Unit
    ---
    brain_area
    """


class AreaConfig(djp.Lookup):  # method table logging different ways of mapping unit_keys to brain areas
    class AreaMemberShip(djp.Part):  # load brain area from the above table AreaMemberShip, this table does not need any secondary keys
        definition = """
        -> master
        ---
        """

Originally posted by @ZhuokunDing in #1 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions