Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
bom_identify
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf8635ca
authored
Jun 05, 2020
by
lichenggang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
数量列不能以0开头
parent
0ca4aa9a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
predict/base_handler.py
predict/base_handler.py
View file @
cf8635ca
...
...
@@ -77,9 +77,9 @@ class BasePredictor:
collect_num
=
[]
for
kw
in
data
:
if
isinstance
(
kw
,
int
)
or
isinstance
(
kw
,
float
)
or
isNumberCol
(
str
(
kw
)):
if
str
(
kw
)[:
1
]
==
'0'
:
if
str
(
kw
)
.
startswith
(
'0'
)
and
len
(
str
(
kw
))
>=
2
:
return
False
if
isinstance
(
kw
,
int
)
or
isinstance
(
kw
,
float
)
or
isNumberCol
(
str
(
kw
)):
collect_num
.
append
(
kw
)
rate
=
round
(
len
(
collect_num
)
/
len
(
data
),
3
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment