def from_pandas(cls, series):
        """Create baloo Series from pandas Series.

        Parameters
        ----------
        series : pandas.series.Series

        Returns
        -------
        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)
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 )
Create baloo Series from pandas Series.

        Parameters
        ----------
        series : pandas.series.Series

        Returns
        -------
        Series