You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use calamine_to_polars::*;use polars::frame::DataFrame;use polars::datatypes::DataType::{Float32,Int32};fnmain() -> Result<(),Box<dynError>>{// Read Excel to DataFramelet file_path = "/path/to/your/excel.xlsx";let sheet_name = "sheet name";letmut df:DataFrame = CalamineToPolarsReader::new(file_path).open_sheet(sheet_name).unwrap().to_frame_all_str()// This method reads each cell's data as a string, you can cast to some data type later.unwrap();// Before type castingprintln!("{:#?}", df);// Convenient cast
df = df
.with_types(&[// Change column name to match yours("상품합계",Float32),// Change column name to match yours("수량",Int32),]).unwrap();// After convenient castingprintln!("{:#?}", df);Ok(())}