update module structure

This commit is contained in:
Palash Tyagi
2024-11-17 02:02:31 +00:00
parent 566c7be71d
commit d4721a0b79
13 changed files with 668 additions and 469 deletions

View File

@@ -402,7 +402,7 @@ fn timeseries_list_to_dataframe(
timeseries_list: Vec<DQTimeSeries>,
dropna: bool,
) -> Result<DataFrame, Box<dyn Error>> {
let mut output_df = DataFrame::new(vec![]).expect("Failed to create DataFrame");
let mut output_df: DataFrame;
if let Some((first, rest)) = timeseries_list.split_first() {
// Convert the first timeseries to DataFrame and clone it to avoid modifying the original
@@ -438,7 +438,7 @@ fn timeseries_list_to_dataframe(
output_df = result_df.clone();
} else {
println!("No timeseries provided.");
return Err("No timeseries provided".into());
}
// drop rows where all values are NA

View File

@@ -1,5 +1,5 @@
use crate::download::oauth_client::OAuthClient;
use crate::download::helpers::DQTimeseriesRequestArgs;
use crate::download::oauth_client::OAuthClient;
use futures::future;
use reqwest::header::{HeaderMap, HeaderName, HeaderValue};
use std::error::Error;