Skip to content

Function for inserting table key at ordinal in a TableLike #747

Open
@nathaniel-daniel

Description

@nathaniel-daniel

Hello, I would like a function that would allow me to insert a key at a specified ordinal in a TableLike. I have a program that accepts a config file like the following (example):

[user]
first = "John"
last = "Doe"

Then my program will generate a key which is considered more "important" than the others, and I would like to place it at the top like so:

[user]
id = "John-Doe-1234"
first = "John"
last = "Doe"

However, there doesn't seem to be an api to control the insertion order of keys in a TableLike. Furthermore, a TableLike doesn't have a sort_values_by method. Combined, I don't believe there is a way to control entry order in a TableLike at all. Would it be possible to add some functionality to give users more control over entry order in a TableLike, or provide some control over the insertion location?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-editArea: TOML editing APIC-enhancementCategory: Raise on the bar on expectations

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions