Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ requirements:
- matplotlib >=3.3.0
- blessings >=1.7
- scipy >=0.19.1
- pandas
- pandas <2 # In principle the code runs with pandas 2 but the results (plots, tables, formats) are untested
- requests
- prompt_toolkit
- validobj
Expand Down
4 changes: 2 additions & 2 deletions validphys2/src/validphys/tableloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def set_actual_column_level0(df, new_levels):
This is a separate function mostly because it breaks
in every patch update of pandas."""
cols = df.columns
cols.set_levels(new_levels, inplace=True, level=0)
df.columns = cols.set_levels(new_levels, level=0)


# TODO: Find a better place for this function
Expand Down Expand Up @@ -130,7 +130,7 @@ def fixup_min_points(df):
# The idea is: Set to inf the nans of the valid curves, so that we select
# the minimum (which is not infinite). Leave the bad nans as nans, so we
# write nan always for those.
total_chis = total_chis.groupby(axis=1, level=1).apply(fixup_min_points)
total_chis = total_chis.groupby(axis=1, level=1, group_keys=False).apply(fixup_min_points)

# Note, asarray is needed because it ignores NANs otherwise.
argmin = lambda x: pd.Series(np.argmin(np.asarray(x), axis=1), index=x.index)
Expand Down