Adi Vaknin

Results 40 comments of Adi Vaknin

Styling HTML has never been in the scope of styleframe. However, styling the Excel file is straightforward if we keep in mind the percent column format. Here I'm using `iterrows`...

The dataframe object is accessible through the `data_df` attribute.

Sorry, I fixed the example above. It should be ```python def find_indexes(sf): return [index.value for index, row in sf.data_df.iterrows() if float(row['total'].value.split('%')[0]) > 30] ```

You are returning from inside the for loop, and you are also returning the index, not a list. This will causes the function to return `None` if no row matches...

> Is there a reason for this? I'd guess the answer is "because that's the default I needed when started to develop this module more than 6 years ago" :)...

I might be missing something here, but that *will* change the default value from `False` to `True`. Every code that currently calls `to_excel()` without specifically setting `index` *will* generate a...

Ok, so you are suggesting the following changes: https://github.com/DeepSpace2/StyleFrame/blob/c8a11172d84d4af6eab7c75e7563a00926267765/styleframe/style_frame.py#L338-L342 to be changed to ```python def to_excel(self, excel_writer: Union[str, pd.ExcelWriter, pathlib.Path] = 'output.xlsx', sheet_name: str = 'Sheet1', allow_protection: bool = False,...

Interesting. Please do create the PR and we can continue the discussion there. Thanks!

Hi. > a. Columns that contain multi-line values are not much wider than the longest line in a value contained within them This is quite easily fixable, see the commit...

@fiendish > multiply the number of lines (count("\n")+1) by a padded character height That's essentially what `A_FACTOR` and `P_FACTOR` are: > `best_fit` will attempt to calculate the correct column-width based...