(
df: &DataFrame,
rows_removed_by_deduplication: usize,
)
| 139 | } |
| 140 | |
| 141 | pub fn quality_report_df( |
| 142 | df: &DataFrame, |
| 143 | rows_removed_by_deduplication: usize, |
| 144 | ) -> Result<DataQualityReport, String> { |
| 145 | require_ohlcv_columns(df)?; |
| 146 | if df.height() == 0 { |
| 147 | return Ok(DataQualityReport { |
| 148 | row_count: 0, |
| 149 | symbol_count: 0, |
| 150 | duplicate_key_count: 0, |
| 151 | gap_interval_count: 0, |
| 152 | ts_min: None, |
| 153 | ts_max: None, |
| 154 | rows_removed_by_deduplication, |
| 155 | }); |
| 156 | } |
| 157 | let sorted = sort_ohlcv_df(df)?; |
| 158 | quality_report_from_sorted_df(&sorted, rows_removed_by_deduplication) |
| 159 | } |
| 160 | |
| 161 | pub fn clean_ohlcv_df( |
| 162 | df: &DataFrame, |
no test coverage detected