Skip to content

Commit

Permalink
Fix an if-statement
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Nov 24, 2023
1 parent 323a9e1 commit f913d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyam/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _init(self, data, meta=None, index=DEFAULT_META_INDEX, **kwargs):
f"Incompatible `index={index}` with `meta.index={meta.index.names}`"
)
# if meta is in "long" format as key-value columns, cast to wide format
if all(meta.columns == ["key", "value"]):
if len(meta.columns) == 2 and all(meta.columns == ["key", "value"]):
meta = meta.pivot(values="value", columns="key")
meta.columns.name = None

Expand Down

0 comments on commit f913d51

Please sign in to comment.