Getting columns in parquet

Hi,
how can I get column of each record in this code

use parquet::file::reader::{FileReader, SerializedFileReader};
use parquet::record::Row;
use parquet::schema::types::Type;
use parquet::basic::Type as PhysicalType;

fn main() {
  let file = File::open("./dep_less4.parquet").unwrap();
  let reader = SerializedFileReader::new(file).unwrap();
  let mut iter = reader.get_row_iter(None).unwrap();

  while let Some(record) = iter.next() {
    println!("Record: {:?}", record);

  }
}

regards

You could use polar's ParquetReader to read your parquet file into a DataFrame and iterate over its columns:

use polars::prelude::*;

fn main() {
  let file = File::open("./dep_less4.parquet").unwrap();
  let reader = ParquetReader::new(file).unwrap();
  let df = reader.finish();

  for column in df.get_columns() {
    println!("Column: {column:?}");
  }
}