CSV Binaries¶
effectus comes with binaries to read CSV files directly.
Example¶
Run the command make_summary on the command line directly on a CSV file:
$ 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 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 FILENAME [OPTIONS]¶
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-p
,
--precision
¶
Number of decimals to show (default: 2)
-
-h
,
--help
¶
Display usage summary.
the_rule FILENAME [OPTIONS]¶
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-p
,
--precision
¶
Number of decimals to show (default: 2)
-
-h
,
--help
¶
Display usage summary.
attain_causes FILENAME [OPTIONS]¶
-
-l
,
--limit
¶
Causes ratio between 0 and 1 to attain.
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-p
,
--precision
¶
Number of decimals to show (default: 3)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-a
,
--ascending
¶
Cumulate values from smallest to biggest (default: biggest to smallest).
-
-h
,
--help
¶
Display usage summary.
attain_effects FILENAME [OPTIONS]¶
-
-l
,
--limit
¶
Effects ratio between 0 and 1 to attain.
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-p
,
--precision
¶
Number of decimals to show (default: 3)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-a
,
--ascending
¶
Cumulate values from smallest to biggest (default: biggest to smallest).
-
-h
,
--help
¶
Display usage summary.
separate_causes FILENAME [OPTIONS]¶
-
-l
,
--limit
¶
Causes ratio between 0 and 1 to attain (default: 0.2)
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-p
,
--precision
¶
Number of decimals to show (default: 3)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-a
,
--ascending
¶
Cumulate values from smallest to biggest (default: biggest to smallest).
-
-h
,
--help
¶
Display usage summary.
separate_effects FILENAME [OPTIONS]¶
-
-l
,
--limit
¶
Effects ratio between 0 and 1 to attain (default: 0.8)
-
-d
,
--delimiter
¶
Column delimiter (default: ‘,’)
-
-p
,
--precision
¶
Number of decimals to show (default: 3)
-
-o
,
--observations
¶
Column number of observations (default: 1)
-
-f
,
--frequencies
¶
Column number of frequencies (default: 2)
Set to -1 to deactivate for files with more than a single column.
-
-a
,
--ascending
¶
Cumulate values from smallest to biggest (default: biggest to smallest).
-
-h
,
--help
¶
Display usage summary.