Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
bmw-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
a017b458
authored
2021-06-11 18:37:28 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add filter
1 parent
4b008519
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
src/apps/doc/ocr/wb.py
src/apps/doc/ocr/wb.py
View file @
a017b45
...
...
@@ -7,7 +7,7 @@ from pandas._libs import tslib
from
pandas._libs.tslibs.nattype
import
NaTType
from
pandas.core.indexes.datetimes
import
DatetimeIndex
from
openpyxl
import
Workbook
from
openpyxl.styles
import
Border
,
Side
,
PatternFill
,
numbers
from
openpyxl.styles
import
PatternFill
,
numbers
from
openpyxl.utils
import
get_column_letter
from
apps.doc
import
consts
...
...
@@ -452,6 +452,9 @@ class BSWorkbook(Workbook):
amount_fill_row
=
set
()
loan_fill_row
=
set
()
# 添加筛选
new_ws
.
auto_filter
.
ref
=
'A1:{0}{1}'
.
format
(
get_column_letter
(
new_ws
.
max_column
),
new_ws
.
max_row
)
for
rows
in
new_ws
.
iter_rows
(
min_row
=
2
):
length
=
len
(
rows
)
summary_cell
=
None
if
summary_cell_idx
is
None
or
summary_cell_idx
>=
length
else
rows
[
summary_cell_idx
]
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment