autofunc.counter_pandas_with_counts¶
This counts instances of function-flow combinations per component to find the frequency of each combination by dividing it by all of the combinations for each component (# of occurrences / total occurrences).
The output includes some of the intermediate data structures that can be used for finding other numbers besides frequency.
Module Contents¶
Functions¶
|
Counts instances and sorts them by frequency |
-
autofunc.counter_pandas_with_counts.counter_pandas_with_counts(dataframe)¶ Counts instances and sorts them by frequency
- Parameters
dataframe (Pandas dataframe) – A Pandas dataframe with the product information
- Returns
comb_sort – Returns a dictionary of function and flow combinations sorted by frequency. The key is the component and the value is a list of the structure: [function-flow, frequency]
counts – Returns a dictionary of the total number of function and flow combinations for each component
combos – Returns a dictionary of the number of individual instances of function and flow combinations per component