xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Support `create_index: bool` in `to_dataframe()` to skip creating MultiIndex

Open dhruvak001 opened this issue 2 months ago • 1 comments

  • [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.

dhruvak001 avatar Dec 03 '25 21:12 dhruvak001

Can you make this change for to_dask_dataframe too please?

dcherian avatar Dec 04 '25 19:12 dcherian