Questions tagged [styleframe]

StyleFrame is a Python library that wraps pandas and openpyxl and makes outputting styled dataframes to Excel easy.

Resources:

53 questions
1
vote
1 answer

StyleFrame Plugin Not Respecting number_format

No matter what I have tried, StyleFrame seems to insist on formatting all dates in DD/MM/YYYY format. I am trying to get them to format as MM/DD/YYYY. I am trying to control this using number_format but it appears to be entirely ignored in the…
emersm2
  • 11
  • 1
1
vote
0 answers

Speeding up the saving excel process while using Styleframe

I am using StyleFrame's to_excel function to save the dataframe df in .xlsx file. Below is my code which works fine: import pandas as pd from StyleFrame import StyleFrame, Styler bgStyle = Styler(bg_color='yellow') sf = StyleFrame(df) …
Anudocs
  • 686
  • 1
  • 13
  • 54
1
vote
1 answer

Filter on conditional formatting in excel sheet using pandas

I have an excel file that has conditional formatting with red color in certain rows one of the columns. So my file looks like this Now I have to apply the filter on the "College" column to delete all the rows that have a red-colored…
1
vote
1 answer

Trying to select excel cells with red and green background using Python

I have a file that has green highlighted cells and red highlighted cells indicating severity level. Right now I'm using StyleFrame to extract them but for some reason I can extract the red cells but not the green cells. Any idea of how to go about…
Gorlomi
  • 515
  • 2
  • 11
1
vote
1 answer

How to iterate rows in StyleFrame?

I want to find colored cells by iterating the rows. I know how to iterate columns, but not rows. In pandas dataframe, it would be for i in range(0, len(df.index), 1): print(df.loc[i, 1]) But StyleFrame does not have loc. How can I iterate it…
jayko03
  • 2,329
  • 7
  • 28
  • 51
1
vote
1 answer

deep copy of StyleFrame object

How can I make a shallow or deep copy of StyleFrame object? When I use copy.copy(sf) or , copy.deepcopy(sf) I get error: "RecursionError: maximum recursion depth exceeded while calling a Python object" import copy from StyleFrame import…
Jorge
  • 83
  • 10
1
vote
1 answer

I encounter this error when I try 'pip install StyleFrame', any idea what this error is about?

I encounter this error when I try 'pip install StyleFrame', any idea what this error is about? Command "/Users/pengdanni/Desktop/invoice/venv/bin/python -m pip install --ignore-installed --no-user --prefix…
Danni Peng
  • 75
  • 5
1
vote
1 answer

Read from excel using StyleFrame

sf = sf[[col for col in sf.columns if col.style.fill.fgColor.rgb in ('FFFFFFFF', utils.colors.white)]] I got an error when read the file and looping the columns return object.__getattribute__(self, name) AttributeError: 'Series' object has…
Suresh K
  • 71
  • 1
  • 10
1
vote
1 answer

Excel Styles and Chart from Pandas Dataframe in Single Excel

I am having a Pandas dataframe, which I need to write it to an excel and then do color formating and plot a chart on the same sheet. I have used StyleFrame to do the Coloring & Borders to my Dataframe, but this StyleFrame not works with Pandas…
1
vote
1 answer

Changing column width from excel files

I have a file like so that I am reading from excel: Year Month Day 1 2 1 2 1 2 I want to specify the column width that excel recognizes. I would like to do it in pandas but I don't see a option. I have tried to do it with the…
Stefano Potter
  • 3,467
  • 10
  • 45
  • 82
0
votes
1 answer

Styleframe module - read_excel_as_template doesn't work, outputs a file with no style

I'm creating a program that inserts pandas DataFrames, styled using template files with the read_excel_file_as_template function from the styleframe module, in excel files which are then sent as attachments in e-mails. The idea here is to have a…
diogeek
  • 141
  • 9
0
votes
0 answers

Pandas styleframe styling applies differently to first sheet than all subsequent sheets

I am writing multiple sheets to an excel workbook with some formatting. In general everything works, just the formatting is a little off. The formatting works exactly as I want on the first sheet, but I am looping through multiple data sets and…
ssbsts
  • 844
  • 1
  • 8
  • 13
0
votes
0 answers

Is there a way to display all the values in a .xlsx spreadsheet for a specific colour in a pandas DataFrame besides styleframe?

I have a Microsoft Excel spreadsheet (screenshot) that I'm trying to format using the pandas library in Python, but I can't seem to find any way that I can select only the cells that have a specific colour (blue, for instance). So far, I've tried…
0
votes
1 answer

Read entire row if a specific column has background color in excel sheet using Python

I have an excel sheet which has few columns with background color. I need to fetch all rows which has background color in column B. I tried with styleframe but only able to pick specific cells from excel, not entire row. from styleframe import…
someone
  • 1,638
  • 3
  • 21
  • 36
0
votes
1 answer

styleframe.ExcelWriter's date_format and datetime_format is not work~

Today I use styleframe to help beautify my Excel. While I add the date_format or datetime_format, it's not work. def _write_xlsx(self, filename, data, columns): print(f'Writing {filename} length: {len(data)}') data_frame =…