From 9f3c7966be24ac078aef0934cfdf1e1d4fc5912e Mon Sep 17 00:00:00 2001 From: //hon_fui Date: Wed, 31 Jul 2024 22:59:12 +0800 Subject: [PATCH] Revert "Added macros "df_transposed" to transpose vectors (mixed data type) into Echarts dataframe format." This reverts commit 86c41a1465a32db5f93d73979f2b0bb3ac9c775b. --- charming/src/datatype/dataframe.rs | 40 ------------------------------ 1 file changed, 40 deletions(-) diff --git a/charming/src/datatype/dataframe.rs b/charming/src/datatype/dataframe.rs index bd87fd7..640f2e4 100644 --- a/charming/src/datatype/dataframe.rs +++ b/charming/src/datatype/dataframe.rs @@ -69,43 +69,3 @@ macro_rules! df { ] }; } - -#[macro_export] -macro_rules! df_transposed { - ($([$($x:expr),*]),* $(,)?) => { - - // Determine the length of the vectors (assuming they are all the same length) - let len = $crate::vec_len!($($col),*); - - // Create a vector to store the resulting rows - let mut rows = Vec::with_capacity(len); - - // Iterate over the length of the vectors - for i in 0..len { - vec![ - $( - $crate::datatype::DataPoint::from($crate::datatype::CompositeValue::from(vec![ - $( - $crate::datatype::CompositeValue::from($x[i].clone()) - ),* - ])) - ),* - ] - } - }; - ($($x:expr),* $(,)?) => { - vec![ - $( - $crate::datatype::DataPoint::from($x) - ),* - ] - }; -} - -#[macro_export] -macro_rules! vec_len { - ($first:expr $(, $rest:expr)*) => { - $first.len() - }; -} -