Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different behavior of null_count when using regex field selector #1639

Open
cmcgowanprovidertrust opened this issue Aug 29, 2024 · 2 comments
Assignees
Labels

Comments

@cmcgowanprovidertrust
Copy link

Hi there, I am encountering some behavior that I do not understand when trying to use stats1 -a null_count. The accumulator does not seem to work if I specify my columns using --fr instead of -f.

I am specifically working with pipe-delimited files and field names with spaces in them. I am not sure that matters at all.

Here is a simple example:

% cat testnull.csv 
Id|Type|Other Type|Number
a||foo|1
b||bar|2
c|||1
% mlr --oxtab --icsv --ifs "|" cat then stats1 -a null_count -f "Id","Type","Other Type","Number" testnull.csv
Id_null_count         0
Type_null_count       3
Other Type_null_count 1
Number_null_count     0
% mlr --oxtab --icsv --ifs "|" cat then stats1 -a null_count --fr ".*" testnull.csv                           
Id_null_count         0
Type_null_count       0
Other Type_null_count 0
Number_null_count     0

I would expect the call using --fr to produce the same results as the first, but it does not.

Apologies if this is just my misunderstanding of the tool and this is correct behavior, I am new to Miller and could be missing something.

@cmcgowanprovidertrust
Copy link
Author

Version is 6.12.0, running in Zsh on Mac, installed with Homebrew.

@aborruso
Copy link
Contributor

The same for me. It seems to me a bug cc @johnkerl

@johnkerl johnkerl self-assigned this Aug 30, 2024
@johnkerl johnkerl added the bug label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants