Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
79fec9c9
Commit
79fec9c9
authored
Feb 22, 2021
by
赵杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shift
parent
0004379c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
data_service_v2_1.py
app/service/data_service_v2_1.py
+2
-2
No files found.
app/service/data_service_v2_1.py
View file @
79fec9c9
...
...
@@ -502,7 +502,7 @@ class UserCustomerDataAdaptor:
# actual_share_dict[cur_fund_id] = cur_fund_share
for
p_fund_id_
in
p_outside_order_df
[
"fund_id"
]
.
unique
():
cnav_df
[
p_fund_id_
+
"_earn"
]
=
(
cnav_df
[
p_fund_id_
+
"_profit"
]
*
cnav_df
[
p_fund_id_
+
"_share"
])
.
apply
(
cnav_df
[
p_fund_id_
+
"_earn"
]
=
(
cnav_df
[
p_fund_id_
+
"_profit"
]
*
cnav_df
[
p_fund_id_
+
"_share"
]
.
shift
(
1
))
.
fillna
(
0
)
.
apply
(
lambda
x
:
float
(
x
))
.
fillna
(
0
)
cnav_df
[
p_fund_id_
+
"_cum_earn"
]
=
cnav_df
[
p_fund_id_
+
"_earn"
]
.
cumsum
()
.
fillna
(
0
)
cnav_df
[
p_fund_id_
+
"_net_amount"
]
=
cnav_df
[
p_fund_id_
+
"_cum_earn"
]
.
apply
(
lambda
x
:
Decimal
(
x
))
+
\
...
...
@@ -666,7 +666,7 @@ class UserCustomerDataAdaptor:
# actual_share_dict[cur_fund_id] = cur_fund_share
for
p_fund_id_
in
p_outside_order_df
[
"fund_id"
]
.
unique
():
cnav_df
[
p_fund_id_
+
"_earn"
]
=
(
cnav_df
[
p_fund_id_
+
"_profit"
]
*
cnav_df
[
p_fund_id_
+
"_share"
])
.
apply
(
lambda
x
:
float
(
x
))
.
fillna
(
0
)
cnav_df
[
p_fund_id_
+
"_earn"
]
=
(
cnav_df
[
p_fund_id_
+
"_profit"
]
*
cnav_df
[
p_fund_id_
+
"_share"
]
.
shift
(
1
))
.
fillna
(
0
)
.
apply
(
lambda
x
:
float
(
x
))
.
fillna
(
0
)
cnav_df
[
p_fund_id_
+
"_cum_earn"
]
=
cnav_df
[
p_fund_id_
+
"_earn"
]
.
cumsum
()
.
fillna
(
0
)
cnav_df
[
p_fund_id_
+
"_net_amount"
]
=
cnav_df
[
p_fund_id_
+
"_cum_earn"
]
.
apply
(
lambda
x
:
Decimal
(
x
))
+
cnav_df
[
p_fund_id_
+
"_amount"
]
for
p_fund_id_
in
p_inter_order_df
[
"fund_id"
]
.
unique
():
...
...
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