Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
πŸš€ Rekha is in active development - API may change between versions
Rekha Documentation
Light Logo Dark Logo
Rekha Documentation

User Guide

  • Quick Start Guide
  • User Guide
    • Plot Types
      • Line Plots
      • Scatter Plots
      • Bar Plots
      • Histograms
      • Box Plots
      • Heatmaps
      • CDF Plots
    • Advanced Features
      • Facet Grids
      • Plot Composition
      • Axis Scales and Formatting
      • Color Palettes
      • Grayscale Friendly Mode
      • Consistent Colors and Ordering
      • Matplotlib Customization
      • Save Formats

API Reference

  • API Reference
    • rekha.line
    • rekha.scatter
    • rekha.bar
    • rekha.histogram
    • rekha.heatmap
    • rekha.box
    • rekha.cdf
    • rekha.subplots
    • rekha.set_rekha_theme
    • rekha.plots.LinePlot
    • rekha.plots.ScatterPlot
    • rekha.plots.BarPlot
    • rekha.plots.HistogramPlot
    • rekha.plots.HeatmapPlot
    • rekha.plots.BoxPlot
    • rekha.plots.CDFPlot
    • rekha.BasePlot
    • rekha.utils.prepare_data
    • rekha.utils.validate_data
    • rekha.utils.get_color_palette
    • rekha.utils.map_colors_to_categories

Development

  • Contributing to Rekha
Back to top
View this page
Edit this page

rekha.utils.prepare_dataΒΆ

rekha.utils.prepare_data(data: DataFrame | dict | None, x: str | List | ndarray | None = None, y: str | List | ndarray | None = None) → Tuple[Any, Any][source]ΒΆ

Extract x and y data from various input formats.

Parameters:
  • data (DataFrame, dict, or None) – The data source

  • x (str, list, array, or None) – Column names or data arrays

  • y (str, list, array, or None) – Column names or data arrays

Returns:

(x_data, y_data) arrays

Return type:

tuple

Next
rekha.utils.validate_data
Previous
rekha.BasePlot
Copyright © 2025, Vajra Team
Made with Sphinx and @pradyunsg's Furo
On this page
  • rekha.utils.prepare_data
    • prepare_data()