DissimilarityMatrix.
to_data_frame
()[source]¶Create a pandas.DataFrame
from this DissimilarityMatrix
.
State: Experimental as of 0.4.1.
pd.DataFrame
with IDs on index and columns.
pd.DataFrame
Examples
>>> from skbio import DistanceMatrix
>>> dm = DistanceMatrix([[0, 1, 2],
... [1, 0, 3],
... [2, 3, 0]], ids=['a', 'b', 'c'])
>>> df = dm.to_data_frame()
>>> df
a b c
a 0.0 1.0 2.0
b 1.0 0.0 3.0
c 2.0 3.0 0.0