NNPDF / reportengine

A framework for declarative data analysis
https://data.nnpdf.science/validphys-docs/guide.html
GNU General Public License v2.0
1 stars 2 forks source link

ValueError in pd.option_contex #28

Closed siranipour closed 4 years ago

siranipour commented 4 years ago

This line now raises a ValueError: Value must be a nonnegative integer or None

https://github.com/NNPDF/reportengine/blob/9d34899171729f95b221add85347f08a9a41d764/src/reportengine/table.py#L53

Think it may have changed in the new pandas.

siranipour commented 4 years ago

Replacing the -1 with the default 50 works but I don't really know what the knock on effects are

Zaharid commented 4 years ago

Seems pandas introduced some breakage, and on top of it, contrary to what the docs here say

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.set_option.html

None doesn't work properly.

Zaharid commented 4 years ago

Actually None works for 1.0 but no for older versions, so this is creating breakage for no reason...

siranipour commented 4 years ago

Shall we bother updating it in reportengine or keep the old pandas version in the conda recipe?

Zaharid commented 4 years ago

I guess we can update it and change the recipe to specify that it works for pandas above 1.0. But then we need to fix for good the .ix in vp.

siranipour commented 4 years ago

Ok I'll make a PR here then