Skip to content

Use repr instead of str for printing column and index  #42

@richardlin047

Description

@richardlin047

The history cell will output code that might error if it uses columns with number names because of how we format the variable names.

The sort column code snippet is currently:

df.sort_values('{self._sort_field}', ascending={self._sort_ascending}, inplace=True)

This assumes the column name is always a string. To allow columns with numbers as the name, it should be:

df.sort_values({repr(self._sort_field)}, ascending={self._sort_ascending}, inplace=True)

This should be fixed for wherever there is a use of '{variable}' for columns or rows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions