retrieve#
API pages include interactive (HTML) plots that would possibly not render correctly on a mobile device.
- retrieve(plot: PlotSpec | SupPlotsSpec, index: int = 0) DataFrame#
Retrieves the dataframe from a PlotSpec or SupPlotsSpec using the index.
- Parameters:
plot (
PlotSpec | SupPlotsSpec) – The plot to retrieve the dataframe from.index (
int, default0) – The index of the figure to retrieve the dataframe from.
- Returns:
DataFrame– The dataframe utilized in the plot.- Raises:
TypeError – If the plot is not a PlotSpec or SupPlotsSpec object.
ValueError – If no DataFrame can be retrieved from the plot.
Examples
import scanpy as sc from lets_plot import * import cellestial as cl data = cl.datasets.pbmc3k(cache_directory="data") umap = cl.umap(data,key="CD14",axis_type="arrow",color_high="red") cl.retrieve(umap).head()
shape: (5, 8)Barcode X_PCA1 X_PCA2 X_TSNE1 X_TSNE2 X_UMAP1 X_UMAP2 CD14 str f32 f32 f32 f32 f32 f32 f32 "AAACCCAAGGATGGCT-1" -2.698756 -1.970923 34.229698 -30.396513 -0.758709 9.41935 0.0 "AAACCCAAGGCCTAGA-1" -5.051104 9.427238 -9.459503 65.066498 1.472651 -2.361804 0.375316 "AAACCCAAGTGAGTGC-1" -2.535384 -1.728063 -63.691681 -6.706005 3.407673 16.263371 0.0 "AAACCCACAAGAGGCT-1" -3.846453 1.094153 -40.505711 57.683064 -0.056542 3.495222 0.0 "AAACCCACATCGTGGC-1" 0.211629 -1.380853 -26.950605 -43.669479 -5.413215 8.537583 0.0