Skip to content

Should alchemlyb guarantee layout of dataframes? #203

Description

@orbeckst

In the context of #201 it became apparent that the order of columns in a DataFrame can become important if care is not taken to access the correct columns via .loc (and instead .iloc is used, assuming a specific ordering of columns).

#201 (comment) raises the question if alchemlyb should (or can) make guarantees about how dataframes are structured.

The Standard Forms of Raw Data only state what the column labels are but not the order. The examples seem to imply that, for instance, lambda columns are ordered from 0 to 1, but this is not actually stated, and hence no guarantee is actually made.

  • Should we ensure that columns in dfs are ordered in a canonical manner (which would need to be defined)?
  • Should we add a warning or note to the docs that order is not guaranteed?

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