Convert the object stored in this partition to a Pandas DataFrame.

        Returns:
            A Pandas DataFrame.
421535
def to_pandas(self):
        
        dataframe = self.get().to_pandas()
        assert type(dataframe) is pandas.DataFrame or type(dataframe) is pandas.Series

        return dataframe
208606
def _to_dataframe_bqstorage(self, bqstorage_client, dtypes, progress_bar=None):
        """"""
        if bigquery_storage_v1beta1 is None:
            raise ValueError(_NO_BQSTORAGE_ERROR)

        if "$" in self._table.table_id:
            raise ValueError(
                "Reading from a specific partition is not currently supported."
            )
        if "@" in self._table.table_id:
            raise ValueError(
                "Reading from a specific snapshot is not currently supported."
            )

        read_options = bigquery_storage_v1beta1.types.TableReadOptions()
        if self._selected_fields is not None:
            for field in self._selected_fields:
                read_options.selected_fields.append(field.name)

        session = bqstorage_client.create_read_session(
            self._table.to_bqstorage(),
            "projects/{}".format(self._project),
            read_options=read_options,
        )

        # We need to parse the schema manually so that we can rearrange the
        # columns.
        schema = json.loads(session.avro_schema.schema)
        columns = [field["name"] for field in schema["fields"]]

        # Avoid reading rows from an empty table. pandas.concat will fail on an
        # empty list.
        if not session.streams:
            return pandas.DataFrame(columns=columns)

        # Use _to_dataframe_finished to notify worker threads when to quit.
        # See: https://stackoverflow.com/a/29237343/101923
        self._to_dataframe_finished = False

        # Create a queue to track progress updates across threads.
        worker_queue = _NoopProgressBarQueue()
        progress_queue = None
        progress_thread = None
        if progress_bar is not None:
            worker_queue = queue.Queue()
            progress_queue = queue.Queue()
            progress_thread = threading.Thread(
                target=self._process_worker_updates, args=(worker_queue, progress_queue)
            )
            progress_thread.start()

        def get_frames(pool):
            frames = []

            # Manually submit jobs and wait for download to complete rather
            # than using pool.map because pool.map continues running in the
            # background even if there is an exception on the main thread.
            # See: https://github.com/googleapis/google-cloud-python/pull/7698
            not_done = [
                pool.submit(
                    self._to_dataframe_bqstorage_stream,
                    bqstorage_client,
                    dtypes,
                    columns,
                    session,
                    stream,
                    worker_queue,
                )
                for stream in session.streams
            ]

            while not_done:
                done, not_done = concurrent.futures.wait(
                    not_done, timeout=_PROGRESS_INTERVAL
                )
                frames.extend([future.result() for future in done])

                # The progress bar needs to update on the main thread to avoid
                # contention over stdout / stderr.
                self._process_progress_updates(progress_queue, progress_bar)

            return frames

        with concurrent.futures.ThreadPoolExecutor() as pool:
            try:
                frames = get_frames(pool)
            finally:
                # No need for a lock because reading/replacing a variable is
                # defined to be an atomic operation in the Python language
                # definition (enforced by the global interpreter lock).
                self._to_dataframe_finished = True

                # Shutdown all background threads, now that they should know to
                # exit early.
                pool.shutdown(wait=True)
                if progress_thread is not None:
                    progress_thread.join()

        # Update the progress bar one last time to close it.
        self._process_progress_updates(progress_queue, progress_bar)
        return pandas.concat(frames)
1217315
def to_df(self):
        
        df = pd.DataFrame()
        name = []
        band = []
        resolution = []
        mag = []
        e_mag = []
        separation = []
        pa = []
        relative = []
        for o in self._observations:
            for s in o.sources:
                name.append(o.name)
                band.append(o.band)
                resolution.append(o.resolution)
                mag.append(s.mag)
                e_mag.append(s.e_mag)
                separation.append(s.separation)
                pa.append(s.pa)
                relative.append(s.relative)

        return pd.DataFrame({'name':name,'band':band,'resolution':resolution,
                             'mag':mag,'e_mag':e_mag,'separation':separation,
                             'pa':pa,'relative':relative})
85414
def multi_index_to_frame(index):
    
    return pandas.DataFrame(index.tolist(), index=index, columns=index.names)
90218
def _data(self, copy=False):
        
        data = {}
        for key, obj in vars(self).items():
            if isinstance(obj, (pd.Series, pd.DataFrame, pd.SparseSeries, pd.SparseDataFrame)):
                if copy:
                    data[key] = obj.copy(deep=True)
                else:
                    data[key] = obj
        return data
618001
def to_pandas(self, wrap=False, **kwargs):
        

        try:
            import pandas as pd
        except ImportError:
            raise DependencyNotInstalledError(
                    'to_pandas requires `pandas` library')

        def wrapper(result):
            res = result.values
            if wrap:
                from .. import DataFrame
                return DataFrame(res, schema=self.schema)
            return res

        return self.execute(wrapper=wrapper, **kwargs)
105868
def to_pandas(self, columns=None):
        # pylint: disable=import-error
        
        import pandas
        return pandas.DataFrame.from_records(self.to_list(), columns=columns)
207949
def to_pandas(raster, name='value'):
    
    df = pd.DataFrame(raster.raster)
    df = df.stack()
    df = df.reset_index()
    df.columns = ['row', 'col', name]
    df['x'] = df.col.apply(lambda col: raster.geot[0]+(col)*raster.geot[1])
    df['y'] = df.row.apply(lambda row: raster.geot[3]+(row)*raster.geot[-1])
    return df
338668
def GCT(gct_obj):
    
    # Handle all the various initialization types and get an IO object
    gct_io = _obtain_io(gct_obj)

    # Load the GCT file into a DataFrame
    df = pd.read_csv(gct_io, sep='\t', header=2, index_col=[0, 1], skip_blank_lines=True)

    # Apply backwards compatible methods
    _apply_backwards_compatibility(df)

    # Return the Dataframe
    return df
977683
def dframe(self):
        
        self.param.warning("The MultiDimensionalMapping.dframe method is "
                           "deprecated and should no longer be used. "
                           "Use a more specific subclass which does support "
                           "the dframe method instead, e.g. a HoloMap.")
        try:
            import pandas
        except ImportError:
            raise Exception("Cannot build a DataFrame without the pandas library.")
        labels = self.dimensions('key', True) + [self.group]
        return pandas.DataFrame(
            [dict(zip(labels, k + (v,))) for (k, v) in self.data.items()])
1075740
def widget_df(self):
    '''
    
    '''

    if hasattr(self, 'widget_instance') == True:

      if self.widget_instance.mat_string != '':

        tmp_net = deepcopy(Network())

        df_string = self.widget_instance.mat_string

        tmp_net.load_file_as_string(df_string)

        df = tmp_net.export_df()

        return df

      else:
        return self.export_df()

    else:
      if hasattr(self, 'widget_class') == True:
        print('Please make the widget before exporting the widget DataFrame.')
        print('Do this using the widget method: net.widget()')

      else:
        print('Can not make widget because Network has no attribute widget_class')
        print('Please instantiate Network with clustergrammer_widget using: Network(clustergrammer_widget)')
1306462
def as_dataframe(self):
        
        time_series = {}
        for ts_index, ts in enumerate(self.timeSeries):
            index = []
            data = []
            for value in ts.values:
                index.append(value.simTime)
                data.append(value.value)
            time_series[ts_index] = pd.Series(data, index=index)
        return pd.DataFrame(time_series)
7337
def to_dataframe(products):
        
        try:
            import pandas as pd
        except ImportError:
            raise ImportError("to_dataframe requires the optional dependency Pandas.")

        return pd.DataFrame.from_dict(products, orient='index')
572938
def make_dataframe(result):
    
    import pandas as pd
    ret = {}
    if isinstance(result,dict):
        if 'timeseries' in result:
            result = result['timeseries']
    for uuid, data in result.items():
        df = pd.DataFrame(data)
        if len(df.columns) == 5: # statistical data
            df.columns = ['time','min','mean','max','count']
        else:
            df.columns = ['time','value']
        df['time'] = pd.to_datetime(df['time'],unit='ns')
        df = df.set_index(df.pop('time'))
        ret[uuid] = df
    return ret
558170
def datatable_df(self):
        
        data = self._all_datatable_data()
        adf = pd.DataFrame(data)
        adf.columns = self.dt_all_cols
        return self._finish_df(adf, 'ALL')
815144
def _get_data(self) -> BaseFrameManager:
        

        def iloc(partition, row_internal_indices, col_internal_indices):
            return partition.iloc[row_internal_indices, col_internal_indices]

        masked_data = self.parent_data.apply_func_to_indices_both_axis(
            func=iloc,
            row_indices=self.index_map.values,
            col_indices=self.columns_map.values,
            lazy=False,
            keep_remaining=False,
        )
        return masked_data
1065103
def pandas(self):
        
        names,prior,posterior = [],[],[]
        for iname,name in enumerate(self.posterior_parameter.row_names):
            names.append(name)
            posterior.append(np.sqrt(float(
                self.posterior_parameter[iname, iname]. x)))
            iprior = self.parcov.row_names.index(name)
            prior.append(np.sqrt(float(self.parcov[iprior, iprior].x)))
        for pred_name, pred_var in self.posterior_prediction.items():
            names.append(pred_name)
            posterior.append(np.sqrt(pred_var))
            prior.append(self.prior_prediction[pred_name])
        return pd.DataFrame({"posterior": posterior, "prior": prior},
                                index=names)