cellpy icon indicating copy to clipboard operation
cellpy copied to clipboard

Allow specification of values to be summarised in the _make_summary()-method

Open morrowrasmus opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. It should be possible to specify the columns to be summarised in the _make_summary()-method. Currently the default value for select_columns is True, and the columns_to_keep-list is hardcoded, containing only:

            columns_to_keep = [
                self.headers_normal.charge_capacity_txt,
                self.headers_normal.cycle_index_txt,
                self.headers_normal.data_point_txt,
                self.headers_normal.datetime_txt,
                self.headers_normal.discharge_capacity_txt,
                self.headers_normal.test_time_txt,
            ]

The alternative at the moment seems to be to pass select_columns=False in summary_kwargs. Being able to specify the columns_to_keep yields a little more flexibility.

Describe the solution you'd like Make the columns_to_keep-list passble in summary_kwargs.

Additional context

Related to #303, and suggested in the comments there:

          More generally, is it possible to customize the summary features locally by passing in arguments to `make_summary`, or is the only way to overwrite the `cellpy` code?

Originally posted by @valentinsulzer in https://github.com/jepegit/cellpy/issues/303#issuecomment-2090938849

morrowrasmus avatar Jun 27 '24 12:06 morrowrasmus

@morrowrasmus; do you want to give it at try?

jepegit avatar Jun 28 '24 11:06 jepegit