code: def from_pandas(cls, series):
          
          from pandas import Index as PandasIndex, MultiIndex as PandasMultiIndex
  
          if isinstance(series.index, PandasIndex):
              baloo_index = Index.from_pandas(series.index)
          elif isinstance(series.index, PandasMultiIndex):
              baloo_index = MultiIndex.from_pandas(series.index)
          else:
              raise TypeError('Cannot convert pandas index of type={} to baloo'.format(type(series.index)))
  
          return _series_from_pandas(series, baloo_index)
docs: Create baloo Series from pandas Series.
  
          Parameters
          ----------
          series : pandas.series.Series
  
          Returns
          -------
          Series