xarray
xarray copied to clipboard
Support `create_index: bool` in `to_dataframe()` to skip creating MultiIndex
- [x] Closes #10912
- [x] Tests Added
Support [create_index: bool] in [to_dataframe()] to skip creating MultiIndex.
This PR adds a new create_index parameter to both Dataset.to_dataframe() and DataArray.to_dataframe() methods, allowing users to skip the potentially expensive MultiIndex creation and use a simple RangeIndex instead.
Can you make this change for to_dask_dataframe too please?