load_dataframe

Function load_dataframe 

Source
pub fn load_dataframe(
    db_path: &str,
    sql: &str,
) -> Result<DataFrame, PoliteError>
Expand description

Create a DataFrame from a SQLite file with error handling and logging.

This convenience function provides better error messages and optional logging compared to the raw to_dataframe function.

§Arguments

  • db_path - Path to the SQLite database file
  • sql - SQL query to execute

§Examples

use polite::load_dataframe;

let df = load_dataframe("data.db", "SELECT id, name FROM users LIMIT 10")
    .expect("Failed to load data");

println!("Loaded {} rows", df.height());