.. _csv: CSV Binaries ************ `effectus` comes with binaries to read CSV files directly. Example ======= Run the command :command:`make_summary` on the command line directly on a CSV file: .. code-block:: bash $ curl -O https://bitbucket.org/hyllos/effectus-python/csv/missing_teeth.csv $ make_summary missing_teeth.csv Pareto True Ratio 0.917 Causes 1/5 Effects 2/3 Variability 0.04 If there is only one column, it will consider each value as such. If there is more than one column, it will consider the second as the frequency of the values in the first (the last example). If the third column carries the frequencies, use ``--frequencies 3``. The option ``--observations`` works accordingly. If you use ``--frequencies -1``, no frequencies will be considered at all (each observation is counted once). .. note:: Use :py:func:`~effectus.helpers.write_reduced_values` to reduce values to value frequency mappings and write them to a CSV file. Command Reference ================= Each binary expects a filename as argument and may be configured through options. .. _make_summary: :program:`make_summary FILENAME [OPTIONS]` ------------------------------------------ .. program:: make_summary .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -p, --precision Number of decimals to show (default: 2) .. option:: -h, --help Display usage summary. .. _the_rule: :program:`the_rule FILENAME [OPTIONS]` ------------------------------------------ .. program:: the_rule .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -p, --precision Number of decimals to show (default: 2) .. option:: -h, --help Display usage summary. .. _attain_causes: :program:`attain_causes FILENAME [OPTIONS]` ------------------------------------------- .. program:: attain_causes .. option:: -l, --limit Causes ratio between 0 and 1 to attain. .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -p, --precision Number of decimals to show (default: 3) .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -a, --ascending Cumulate values from smallest to biggest (default: biggest to smallest). .. option:: -h, --help Display usage summary. .. _attain_effects: :program:`attain_effects FILENAME [OPTIONS]` -------------------------------------------- .. program:: attain_effects .. option:: -l, --limit Effects ratio between 0 and 1 to attain. .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -p, --precision Number of decimals to show (default: 3) .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -a, --ascending Cumulate values from smallest to biggest (default: biggest to smallest). .. option:: -h, --help Display usage summary. .. _separate_causes: :program:`separate_causes FILENAME [OPTIONS]` --------------------------------------------- .. program:: separate_causes .. option:: -l, --limit Causes ratio between 0 and 1 to attain (default: 0.2) .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -p, --precision Number of decimals to show (default: 3) .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -a, --ascending Cumulate values from smallest to biggest (default: biggest to smallest). .. option:: -h, --help Display usage summary. .. _separate_effects: :program:`separate_effects FILENAME [OPTIONS]` ---------------------------------------------- .. program:: separate_effects .. option:: -l, --limit Effects ratio between 0 and 1 to attain (default: 0.8) .. option:: -d, --delimiter Column delimiter (default: ',') .. option:: -p, --precision Number of decimals to show (default: 3) .. option:: -o, --observations Column number of observations (default: 1) .. option:: -f, --frequencies Column number of frequencies (default: 2) Set to -1 to deactivate for files with more than a single column. .. option:: -a, --ascending Cumulate values from smallest to biggest (default: biggest to smallest). .. option:: -h, --help Display usage summary.