pandas.Series.to_xarray

pandas 3.1.1 · Series and accessors · method

Convert labeled pandas data to the corresponding xarray object.

Call syntax

Series.to_xarray()

Run the example

Edit the example and select Run Python to see the result.

Parameters

This call takes no arguments.

Returns

xarray.DataArray or xarray.Dataset