(
cls,
variables: Mapping[Any, Variable],
*,
options: Mapping[str, Any],
)
| 1062 | |
| 1063 | @classmethod |
| 1064 | def from_variables( |
| 1065 | cls, |
| 1066 | variables: Mapping[Any, Variable], |
| 1067 | *, |
| 1068 | options: Mapping[str, Any], |
| 1069 | ) -> PandasMultiIndex: |
| 1070 | _check_dim_compat(variables) |
| 1071 | dim = next(iter(variables.values())).dims[0] |
| 1072 | |
| 1073 | index = pd.MultiIndex.from_arrays( |
| 1074 | [var.values for var in variables.values()], names=list(variables.keys()) |
| 1075 | ) |
| 1076 | index.name = dim |
| 1077 | level_coords_dtype = {name: var.dtype for name, var in variables.items()} |
| 1078 | obj = cls(index, dim, level_coords_dtype=level_coords_dtype) |
| 1079 | |
| 1080 | return obj |
| 1081 | |
| 1082 | @classmethod |
| 1083 | def concat( |
nothing calls this directly
no test coverage detected