We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
count
1 parent 2febde3 commit abcd365Copy full SHA for abcd365
src/cmd/count.rs
@@ -157,7 +157,13 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
157
count_input(&conf, count_delims_mode)?
158
} else {
159
let count = polars_count_input(&conf, args.flag_low_memory)?;
160
- (count, empty_record_stats)
+ // if polars count returns a zero, do a regular CSV reader count
161
+ // to be doubly sure as it will be cheap to do so with the regular count
162
+ if count == 0 {
163
+ count_input(&conf, count_delims_mode)?
164
+ } else {
165
+ (count, empty_record_stats)
166
+ }
167
}
168
169
#[cfg(not(feature = "polars"))]
0 commit comments