code: def to_pyflux_dataset(X):
      """Transform a tslearn-compatible dataset into a pyflux dataset.
  
      Parameters
      ----------
      X: array, shape = (n_ts, sz, d), where n_ts=1
          tslearn-formatted dataset to be cast to pyflux format
  
      Returns
      -------
      Pandas data-frame
          pyflux-formatted dataset (cf.
          `link <https://pyflux.readthedocs.io/en/latest/getting_started.html>`_)
  
      Examples
      --------
      >>> tslearn_arr = numpy.random.randn(1, 16, 1)
      >>> pyflux_df = to_pyflux_dataset(tslearn_arr)
      >>> pyflux_df.shape
      (16, 1)
      >>> pyflux_df.columns[0]
      'dim_0'
      >>> tslearn_arr = numpy.random.randn(1, 16, 2)
      >>> pyflux_df = to_pyflux_dataset(tslearn_arr)
      >>> pyflux_df.shape
      (16, 2)
      >>> pyflux_df.columns[1]
      'dim_1'
      >>> tslearn_arr = numpy.random.randn(10, 16, 1)
      >>> to_pyflux_dataset(tslearn_arr)  # doctest: +IGNORE_EXCEPTION_DETAIL
      Traceback (most recent call last):
      ...
      ValueError: Array should be made of a single time series (10 here)
  
      Notes
      -----
      Conversion from/to pyflux format requires pandas to be installed.
      """  # noqa: E501
      try:
          import pandas as pd
      except ImportError:
          raise ImportError(
              "Conversion from/to pyflux cannot be performed "
              "if pandas is not installed."
          )
      X_ = check_dataset(
          X, force_equal_length=True, force_single_time_series=True
      )
      X_pd = pd.DataFrame(X[0], dtype=float)
      X_pd.columns = ["dim_%d" % di for di in range(X_.shape[2])]
      return X_pd
  
file_path: tslearn/tslearn/utils/cast.py
imports: import warnings
  import numpy
  from sklearn.utils import check_array
  from .utils import check_dataset, ts_size, to_time_series_dataset
label_desc: Use image node_id 10 for calling a global function with example usage: to_pyflux_dataset(X) and returns: X_pd