Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
Rule Engine Service
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
brooklyn
Rule Engine Service
Commits
8b2e67fd
Commit
8b2e67fd
authored
Feb 06, 2023
by
Sarah Abrishami
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrected validation
parent
8726526e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
app/main/views/validate.py
app/main/views/validate.py
+2
-0
No files found.
app/main/views/validate.py
View file @
8b2e67fd
...
@@ -16,12 +16,14 @@ def validate(dsid, rgid):
...
@@ -16,12 +16,14 @@ def validate(dsid, rgid):
rg
.
reset_data
(
data
)
rg
.
reset_data
(
data
)
data
[
'loan_balance'
]
=
data
[
'loan_balance'
]
.
round
(
0
)
.
astype
(
pd
.
Int64Dtype
())
data
[
'loan_balance'
]
=
data
[
'loan_balance'
]
.
round
(
0
)
.
astype
(
pd
.
Int64Dtype
())
validation
,
responsible
=
rg
.
validate
()
validation
,
responsible
=
rg
.
validate
()
validation
.
name
=
'validated'
print
(
'validated'
)
print
(
'validated'
)
# .rename(columns={'customer_id': 'شناسه مشتری', 'loan_id': 'شناسه تسهیلات', 'loan_balance': 'مبلغ تسهیلات'})
# .rename(columns={'customer_id': 'شناسه مشتری', 'loan_id': 'شناسه تسهیلات', 'loan_balance': 'مبلغ تسهیلات'})
index_cols
=
data
[[
'customer_id'
,
'loan_id'
,
'loan_balance'
]]
index_cols
=
data
[[
'customer_id'
,
'loan_id'
,
'loan_balance'
]]
validation
=
pd
.
concat
([
index_cols
,
validation
,
responsible
],
axis
=
1
)
.
iloc
[:,
1
:]
validation
=
pd
.
concat
([
index_cols
,
validation
,
responsible
],
axis
=
1
)
.
iloc
[:,
1
:]
validation
=
validation
.
reset_index
()
.
rename
(
columns
=
{
'index'
:
'rid'
})
validation
=
validation
.
reset_index
()
.
rename
(
columns
=
{
'index'
:
'rid'
})
# TODO return rule group id
# TODO return rule group id
# validation['rgid'] = rgid
# validation['rgid'] = rgid
# validation['dsid'] = dsid
# validation['dsid'] = dsid
# result = write_validations(validation, where='db')
# result = write_validations(validation, where='db')
...
...
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