KaveIO / PhiK

Phi_K correlation analyzer library
Other
156 stars 28 forks source link

How to avoid print statement #13

Closed spantiru closed 3 years ago

spantiru commented 4 years ago

Hi!

First, thanks for this library! It is exactly what we needed for quickly getting a feel of correlations across different variable types!

A small issue we're having is that when we want the library to guess the interval columns, it prints a message https://github.com/KaveIO/PhiK/blob/a51e0465ebc67ff09518f6762fcaf93b8656ee44/python/phik/utils.py#L28

This is not normally an issue in prototyping phase, but it becomes a little annoying in tests and log files in production especially when we're working with lots of variables (some of which may have long names) as it sometimes obscures relevant messages.

For us it would be great if this message was not displayed at all when when we explicitly want this behaviour (i.e. if we specify interval_cols to be something like 'auto'). Other options would be to not print it at all or at least issue it as a warning instead of a 'print', maybe?

Thanks once again for your work!

mbaak commented 3 years ago

Hi, there's a verbose flag now in v0.11.0 of the phik library. You can now do: df.phik_matrix(verbose=False) and it will not the interval columns that have not been set.