The ._to_dataframe() method mangles the dataset under certain circumstances (where ._to_array() returns the correct result). I do not have a reproducible example for this at the moment, but we should consider fixing the ._to_dataframe() method once this issue is identified/reproduced.