Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
meta_base_code
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋柯
meta_base_code
Commits
1f12a545
Commit
1f12a545
authored
Jul 12, 2021
by
郭羽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test:export service ecpm data
parent
bbcbfacf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
ecpm_data_export_test.py
test/ecpm_data_export_test.py
+4
-3
No files found.
test/ecpm_data_export_test.py
View file @
1f12a545
...
...
@@ -13,12 +13,13 @@ def getConn():
if
__name__
==
'__main__'
:
sql
=
"""
select service_id,service_all_first_browse_num_d,service_all_preciseexpose_num_d,service_cpc_expend_recharge_amount_d
select
day_id,
service_id,service_all_first_browse_num_d,service_all_preciseexpose_num_d,service_cpc_expend_recharge_amount_d
,service_add_cart_click_num_d,service_message_click_num_d,service_buy_click_num_d,service_validate_order_commission_non_doctor_d
from sl_strategy_pt_sv_servicesmartrank_d
from sl_strategy_pt_sv_servicesmartrank_d
where day_id='20210711'
"""
conn
=
getConn
()
df
=
pd
.
read_sql_query
(
sql
,
conn
)
df
.
head
(
10
);
print
(
df
.
head
(
10
))
print
(
df
.
count
())
df
.
to_excel
(
"ecpm_data.xlsx"
)
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