class_docstr: Object that can be rendered by HiPlot. It essential contains a list of metrics, but also some options on how to render it.
  
  See :meth:`Experiment.display` to display an :class:`Experiment` in an ipython notebook.
  
  :ivar datapoints: All the measurements we have. One datapoint corresponds to one line in the parallel plot and to one line in the table.
  :ivar parameters_definition: Characteristics of the columns (ordering, type, etc...)
  :ivar colormap: Colormap to use
  :ivar colorby: Default column to color by
  :ivar weightcolumn: If rows have different weights, use this column as the weight (default to 1 if not specified)
  :ivar enabledDisplays: Ordered displays to enable (by default all are enabled)
  
  :Example:
  
  .. code-block:: python
  
      import hiplot as hip
      data = [{'param': 1, 'loss': 10, 'hidden_field': 'value1', 'c': 'red'},
          {'param': 2, 'loss': 5, 'hidden_field': 'value2', 'c': 'black'}]
      exp = hip.Experiment.from_iterable(data)
docstr: Creates a HiPlot experiment from a pandas DataFrame.
  
  :param dataframe: Pandas DataFrame
docstr_tok: ["Creates","a","HiPlot","experiment","from","a","pandas","DataFrame",".",":","param","dataframe",":","Pandas","DataFrame"]
code: def from_dataframe(
      dataframe: "pd.DataFrame",
  ) -> (
      "Experiment"
  ):  # No type hint to avoid having pandas as an additional dependency
      """
      Creates a HiPlot experiment from a pandas DataFrame.
  
      :param dataframe: Pandas DataFrame
      """
      # Check if from_uid and uid is both in columns
      if {"from_uid", "uid"}.issubset(dataframe.columns):
          # Check if there are any NaN values to handle
          if dataframe["from_uid"].isnull().values.any():
              # NaN values forces integer columns to become float, if uid is integer and from_uid is float, it crashes.
              # The line below changes uid to match from_uid type (either float or string), since NaN cannot be integer.
              dataframe["uid"] = dataframe["uid"].astype(
                  dataframe["from_uid"].dtypes
              )
              dataframe = dataframe.fillna({"from_uid": "", "uid": ""})
  
              # Replaces their dtypes accordingly to str, which is handled better with lesser errors with no change to functionality
              dataframe["uid"] = dataframe["uid"].astype(str)
              dataframe["from_uid"] = dataframe["from_uid"].astype(str)
  
      experiment = Experiment.from_iterable(
          dataframe.to_dict(orient="records")
      )
  
      # Restore columns order
      experiment.display_data(Displays.PARALLEL_PLOT)["order"] = list(
          dataframe.columns
      )
      experiment.display_data(Displays.TABLE)["order"] = list(
          dataframe.columns
      )
  
      return experiment
  
imports: import csv
  import uuid
  import json
  import codecs
  import warnings
  from abc import ABCMeta, abstractmethod
  from enum import Enum
  from collections import defaultdict
  from pathlib import Path
  import typing
label_desc: Use image node_id 17 for calling the Experiment obj's underlying member method code with example usage: obj.from_dataframe(dataframe) and returns: experiment