From 0071528e6258aa22a965bebbe17d179a8c1d0f2f Mon Sep 17 00:00:00 2001 From: Daniel Boros Date: Sat, 28 Sep 2024 14:12:46 +0200 Subject: [PATCH] fix: variable naming --- stochastic-rs-quant/src/yahoo.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/stochastic-rs-quant/src/yahoo.rs b/stochastic-rs-quant/src/yahoo.rs index cb4acf2..67aff15 100644 --- a/stochastic-rs-quant/src/yahoo.rs +++ b/stochastic-rs-quant/src/yahoo.rs @@ -81,13 +81,13 @@ impl<'a> Yahoo<'a> { let history = res.quotes().unwrap(); let df = df!( - "timestamp" => Series::new("timestamp".into(), &history.iter().map(|r| r.timestamp / 86_400).collect::>()).cast(&DataType::Date).unwrap(), - "volume" => &history.iter().map(|r| r.volume).collect::>(), - "open" => &history.iter().map(|r| r.open).collect::>(), - "high" => &history.iter().map(|r| r.high).collect::>(), - "low" => &history.iter().map(|r| r.low).collect::>(), - "close" => &history.iter().map(|r| r.close).collect::>(), - "adjclose" => &history.iter().map(|r| r.adjclose).collect::>(), + "timestamp" => Series::new("timestamp".into(), &history.iter().map(|h| h.timestamp / 86_400).collect::>()).cast(&DataType::Date).unwrap(), + "volume" => &history.iter().map(|h| h.volume).collect::>(), + "open" => &history.iter().map(|h| h.open).collect::>(), + "high" => &history.iter().map(|h| h.high).collect::>(), + "low" => &history.iter().map(|h| h.low).collect::>(), + "close" => &history.iter().map(|h| h.close).collect::>(), + "adjclose" => &history.iter().map(|h| h.adjclose).collect::>(), ) .unwrap();