mirror of
https://github.com/Magnus167/msyrs.git
synced 2025-08-20 04:20:00 +00:00
Fix typo in function name from create_interesecting_tickers
to create_intersecting_tickers
This commit is contained in:
parent
0f0b7b7259
commit
1dd82e0b23
@ -55,7 +55,7 @@ pub fn create_ticker(cid: &str, xcat: &str) -> String {
|
||||
format!("{}_{}", cid, xcat)
|
||||
}
|
||||
|
||||
pub fn create_interesecting_tickers(cids: &[&str], xcats: &[&str]) -> Vec<String> {
|
||||
pub fn create_intersecting_tickers(cids: &[&str], xcats: &[&str]) -> Vec<String> {
|
||||
let mut tickers = Vec::new();
|
||||
for cid in cids {
|
||||
for xcat in xcats {
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::utils::misc::{
|
||||
_get_unique_strs_from_str_column_object, create_interesecting_tickers,
|
||||
_get_unique_strs_from_str_column_object, create_intersecting_tickers,
|
||||
get_intersecting_cids_str_func, get_unique_from_str_column,
|
||||
};
|
||||
use polars::datatypes::DataType;
|
||||
@ -108,7 +108,7 @@ fn get_tickers_interesecting_on_xcat(
|
||||
.unwrap_or_else(|| get_unique_xcats(df).unwrap());
|
||||
let rel_cids_str: Vec<&str> = rel_cids.iter().map(AsRef::as_ref).collect();
|
||||
let rel_xcats_str: Vec<&str> = rel_xcats.iter().map(AsRef::as_ref).collect();
|
||||
Ok(create_interesecting_tickers(&rel_cids_str, &rel_xcats_str))
|
||||
Ok(create_intersecting_tickers(&rel_cids_str, &rel_xcats_str))
|
||||
}
|
||||
|
||||
/// Get the unique tickers from a Quantamental DataFrame.
|
||||
|
@ -51,7 +51,7 @@ pub fn reduce_dataframe(
|
||||
let specified_metrics: Vec<String> =
|
||||
metrics.unwrap_or_else(|| non_idx_cols.iter().map(|s| s.to_string()).collect());
|
||||
|
||||
let specified_tickers: Vec<String> = create_interesecting_tickers(
|
||||
let specified_tickers: Vec<String> = create_intersecting_tickers(
|
||||
&specified_cids
|
||||
.iter()
|
||||
.map(AsRef::as_ref)
|
||||
@ -76,7 +76,7 @@ pub fn reduce_dataframe(
|
||||
.collect::<Vec<String>>(),
|
||||
&u_tickers,
|
||||
);
|
||||
create_interesecting_tickers(
|
||||
create_intersecting_tickers(
|
||||
&int_cids.iter().map(AsRef::as_ref).collect::<Vec<&str>>(),
|
||||
&specified_xcats
|
||||
.iter()
|
||||
|
Loading…
x
Reference in New Issue
Block a user