mirror of
https://github.com/logos-blockchain/logos-blockchain-simulations.git
synced 2026-01-19 13:33:11 +00:00
use f64
This commit is contained in:
parent
8eb4348594
commit
b495b6852a
@ -23,16 +23,22 @@ fn aggregate(path: &str) {
|
||||
.finish()
|
||||
.unwrap();
|
||||
|
||||
aggregated_series
|
||||
.extend(
|
||||
&df.column("latency")
|
||||
.unwrap()
|
||||
.f64()
|
||||
.unwrap()
|
||||
.clone()
|
||||
.into_series(),
|
||||
)
|
||||
.unwrap();
|
||||
match &df.column("latency").unwrap().f64() {
|
||||
Ok(col) => {
|
||||
aggregated_series
|
||||
.extend(&(*col).clone().into_series())
|
||||
.unwrap();
|
||||
}
|
||||
Err(PolarsError::SchemaMismatch(_)) => {
|
||||
let col = &df.column("latency").unwrap().i64().unwrap();
|
||||
aggregated_series
|
||||
.extend(&col.cast(&DataType::Float64).unwrap())
|
||||
.unwrap();
|
||||
}
|
||||
Err(e) => {
|
||||
panic!("Error: {}", e);
|
||||
}
|
||||
};
|
||||
|
||||
println!("Processed {}", file.display());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user