StyleFrame is a Python library that wraps pandas and openpyxl and makes outputting styled dataframes to Excel easy.
Questions tagged [styleframe]
53 questions
4
votes
1 answer
Subsetting a dataframe based on cell color and text color in excel sheet
I have an excel sheet with more than 1000 columns and 300 rows. Some these cells have normal data, while some cells have a background color of red and some cells have normal white background but the text is red in color. For example, my excel sheet…

Hanif
- 377
- 4
- 19
3
votes
5 answers
Pandas dataframe to specific sheet in a excel file without losing formatting
I have a dataframe like as shown below
Date,cust,region,Abr,Number,
12/01/2010,Company_Name,Somecity,Chi,36,
12/02/2010,Company_Name,Someothercity,Nyc,156,
df = pd.read_clipboard(sep=',')
I would like to write this dataframe to a specific…

The Great
- 7,215
- 7
- 40
- 128
3
votes
1 answer
Issue while displaying trailing zeroes in Excel with StyleFrame library in Python
While using the StyleFrame library to write into an excel file, I am not able to retain 3 decimal digits if there are trailing zeroes.
For example, consider the following dataframe:
Next, I write this dataframe into a StyleFrame object for data…

viks_python
- 77
- 1
- 6
3
votes
1 answer
Copying multiple python dataframes into excel using StyleFrame's to_excel method
I have multiple dataframes, df1, df2 etc. Each dataframe contains different number of columns and rows. Using the StyleFrame library, is it possible to copy all the dataframes one by one into a single sheet in an excel file using the to_excel method…

viks_python
- 77
- 1
- 6
3
votes
1 answer
StyleFrame can't write unicode headlines python
While using the StyleFrame package for styling pandas DataFrame with openpyxl i got the following Exception.
When i try this code with an english title it works as i excepted.
self.sf.set_column_width(columns=u'שם הלקוח', width=35)
File…

Tal Peretz
- 515
- 1
- 5
- 15
2
votes
1 answer
How to remove the border of Pandas dataframe?
When I use pandas dataframe to excel, the border of the header will be generated automatically. When I use styleframe to excel, the border of the whole table will be generated automatically.
I can not use pandas.io.formats.excel.header_style = None…

Trinidad
- 211
- 2
- 14
2
votes
1 answer
How to add to data frame based on text color (Styleframe)
I have a large excel file with 90k rows, and I want to add only the rows that have red colored text to a dataframe (using styleframe). The code below works if I use a small excel file with 5 rows, but when I attempt to use it with a larger file the…

ap95btg
- 27
- 3
2
votes
2 answers
Colour specific cells from two columns that don't match, using python pandas style.where (or otherwise) and export to excel
I am looking to colour specific cells from two columns that don't match, but would like to use it with python pandas style.where and export in excel using openpyxl.
My code so far:
df = pd.DataFrame({
'config_dummy1': ["dummytext"] * 100,
…

Savvas Radevic
- 543
- 1
- 8
- 23
2
votes
2 answers
From pandas to Excel using StyleFrame: how to disable the wrap text & shrink to fit?
I use StyleFrame to export from pandas to Excel.
Cells are formatted to 'wrap text' and 'shrink to fit' by default. (How) can I change these settings?
The API documentation describes that the utils module contains the most widely used values for…

Wouter
- 1,296
- 2
- 14
- 32
2
votes
2 answers
excel file with the ability to filter columns
I need to create excel with columns that can be filited.
prefer to use openpyxl since I already use StyleFrame to style the excel.
example

AsafSH
- 675
- 6
- 10
1
vote
1 answer
pandas dataframe to html - border not accurate
I have a dataframe like as below
test_id,status,total,cnt_days,age
1,passed,234%,3,21
2,passed,54%,5,29
11,failed,21%,4,35
15,failed,20%.21,6,57
51,passed,23%,21,80
75,failed,12%,32,43
df1 =…

The Great
- 7,215
- 7
- 40
- 128
1
vote
1 answer
Is it possible to append a StyleFrame to an existing excel worksheet?
I was wondering if it was possible to write a StyleFrame to an arbitrary position in an existing excel worksheet while maintaining the original formatting and styling of pre-existing cells?
E.g In the example below, I'd like to set the output of the…

Sector97
- 116
- 9
1
vote
1 answer
Saving multiple pandas dataframes to Excel file with Styleframe, each one on a different sheet
I am trying to save a number of pandas dataframes to excel. I want them all in the same excel file, but with each one on a different sheet.
This is what I have at the moment. This is just saving all my dataframes to separate files. I have used…
user14380579
1
vote
0 answers
StyleFrame to_excel string attribute error
I'm trying to use Pandas, but keeping the format of the template when I use "pd.read_excel".
I found out that "StyleFrame" could solve my problem, and it actually did after saving the model without any change.
Nevertheless after my code change the…

Conrado Ferreira
- 11
- 2
1
vote
1 answer
Using Styleframe to pull styles of individual cells from Excel
I'm trying to write a script that merges two excel files together. One has been has been hand processed and has a bunch custom formatting done to it, and the other is an auto-generated file. Doing the merge in pandas is simple enough, but preserving…

P-Rock
- 103
- 1
- 10