When building from SampleYAML, the sample index column is not cast to DataType::String like the CSV path is. If the YAML parses the index column as a non-string type (e.g. numbers), later lookups like get_sample(name: &str) can fail due to a dtype mismatch. Consider applying the same .lazy().with_column(col(final_index.clone()).cast(DataType::String)).collect()? normalization used in the CSV branch.
let df = resolve_yaml_to_dataframe(&yaml_path)?
.lazy()
.with_column(col(final_index.clone()).cast(DataType::String))
.collect()?;
Originally posted by @Copilot in #43 (comment)
When building from
SampleYAML, the sample index column is not cast toDataType::Stringlike the CSV path is. If the YAML parses the index column as a non-string type (e.g. numbers), later lookups likeget_sample(name: &str)can fail due to a dtype mismatch. Consider applying the same.lazy().with_column(col(final_index.clone()).cast(DataType::String)).collect()?normalization used in the CSV branch.Originally posted by @Copilot in #43 (comment)