Skip to content

BUG display.max_colwidth do not accept -1 for unlimited width #31532

Closed
@glemaitre

Description

@glemaitre

Code Sample, a copy-pastable example if possible

import pandas as pd
pd.set_option("display.max_colwidth", -1)

Problem description

There is a regression with "display.max_colwidth". In the past, it was only accepting integer. The way to no limit the size was to pass -1. In pandas 1,0, this option becomes more consistent and not limiting the width should be set with None. However, the support for negative integer was removed.

Thus, one would need to either set to -1 or None depending on the pandas version. It would be best to support both options. Potentially, support for negative integer could be removed with a deprecation cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeprecateFunctionality to remove in pandasOutput-Formatting__repr__ of pandas objects, to_stringRegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions