mdbq 3.5.8__py3-none-any.whl → 3.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mdbq/aggregation/query_data.py
CHANGED
@@ -2218,6 +2218,7 @@ class MysqlDatasQuery:
|
|
2218
2218
|
'成交客户数': 1,
|
2219
2219
|
'加购商品件数': 1,
|
2220
2220
|
'加购人数': 1,
|
2221
|
+
'更新时间': 1,
|
2221
2222
|
}
|
2222
2223
|
__res = []
|
2223
2224
|
for year in range(2024, datetime.datetime.today().year + 1):
|
@@ -2309,6 +2310,7 @@ class MysqlDatasQuery:
|
|
2309
2310
|
'成交客户数': 1,
|
2310
2311
|
'加购商品件数': 1,
|
2311
2312
|
'加购人数': 1,
|
2313
|
+
'更新时间': 1,
|
2312
2314
|
}
|
2313
2315
|
__res = []
|
2314
2316
|
for year in range(2024, datetime.datetime.today().year + 1):
|
@@ -2404,6 +2406,7 @@ class MysqlDatasQuery:
|
|
2404
2406
|
'新访客': 1,
|
2405
2407
|
'客单价': 1,
|
2406
2408
|
'uv价值': 1,
|
2409
|
+
'更新时间': 1,
|
2407
2410
|
}
|
2408
2411
|
__res = []
|
2409
2412
|
for year in range(2024, datetime.datetime.today().year+1):
|
@@ -2416,19 +2419,22 @@ class MysqlDatasQuery:
|
|
2416
2419
|
)
|
2417
2420
|
__res.append(df)
|
2418
2421
|
df = pd.concat(__res, ignore_index=True)
|
2419
|
-
df = df.groupby(
|
2420
|
-
|
2421
|
-
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
|
2430
|
-
|
2431
|
-
)
|
2422
|
+
# df = df.groupby(
|
2423
|
+
# ['日期', '店铺名称', '词类型', '搜索词'],
|
2424
|
+
# as_index=False).agg(
|
2425
|
+
# **{
|
2426
|
+
# '访客数': ('访客数', np.max),
|
2427
|
+
# '加购人数': ('加购人数', np.max),
|
2428
|
+
# '支付金额': ('支付金额', np.max),
|
2429
|
+
# '支付转化率': ('支付转化率', np.max),
|
2430
|
+
# '支付买家数': ('支付买家数', np.max),
|
2431
|
+
# '客单价': ('客单价', np.max),
|
2432
|
+
# 'uv价值': ('uv价值', np.max)
|
2433
|
+
# }
|
2434
|
+
# )
|
2435
|
+
idx = df.groupby(['日期', '店铺名称', '词类型', '搜索词'])['更新时间'].idxmax()
|
2436
|
+
df = df.loc[idx]
|
2437
|
+
df = df[['日期', '店铺名称', '词类型', '搜索词', '访客数', '加购人数', '支付金额', '支付转化率', '支付买家数', '客单价', 'uv价值']]
|
2432
2438
|
|
2433
2439
|
set_typ = {
|
2434
2440
|
'日期': 'date',
|
@@ -4194,4 +4200,4 @@ if __name__ == '__main__':
|
|
4194
4200
|
|
4195
4201
|
sdq = MysqlDatasQuery() # 实例化数据处理类
|
4196
4202
|
sdq.months = 3 # 设置数据周期, 1 表示近 2 个月
|
4197
|
-
sdq.
|
4203
|
+
sdq.se_search(db_name='聚合数据', table_name='天猫店铺来源_手淘搜索')
|
@@ -4,7 +4,7 @@ mdbq/aggregation/__init__.py,sha256=EeDqX2Aml6SPx8363J-v1lz0EcZtgwIBYyCJV6CcEDU,
|
|
4
4
|
mdbq/aggregation/aggregation.py,sha256=-yzApnlqSN2L0E1YMu5ml-W827qpKQvWPCOI7jj2kzY,80264
|
5
5
|
mdbq/aggregation/datashow.py,sha256=1AYSIDkdUx-4as1Ax2rPj0cExM9d-qFMrFYLAaPHNuk,54962
|
6
6
|
mdbq/aggregation/optimize_data.py,sha256=RXIv7cACCgYyehAxMjUYi_S7rVyjIwXKWMaM3nduGtA,3068
|
7
|
-
mdbq/aggregation/query_data.py,sha256=
|
7
|
+
mdbq/aggregation/query_data.py,sha256=zySZBs90a5cYs5zBhP6NVcLt-rLDpaxw5iW0OTKYbys,193015
|
8
8
|
mdbq/bdup/__init__.py,sha256=AkhsGk81SkG1c8FqDH5tRq-8MZmFobVbN60DTyukYTY,28
|
9
9
|
mdbq/bdup/bdup.py,sha256=LAV0TgnQpc-LB-YuJthxb0U42_VkPidzQzAagan46lU,4234
|
10
10
|
mdbq/config/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
@@ -36,7 +36,7 @@ mdbq/redis/__init__.py,sha256=YtgBlVSMDphtpwYX248wGge1x-Ex_mMufz4-8W0XRmA,12
|
|
36
36
|
mdbq/redis/getredis.py,sha256=PlWAGMC-WqdZtyvtjjj-i0i8AiBsNP6zgAUb5Fdkark,8481
|
37
37
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
38
38
|
mdbq/spider/aikucun.py,sha256=v7VO5gtEXR6_4Q6ujbTyu1FHu7TXHcwSQ6hIO249YH0,22208
|
39
|
-
mdbq-3.
|
40
|
-
mdbq-3.
|
41
|
-
mdbq-3.
|
42
|
-
mdbq-3.
|
39
|
+
mdbq-3.6.0.dist-info/METADATA,sha256=J_5KkTuR3qb6SiQTBwoPL3CW2ERykJp326azY8M0u1M,243
|
40
|
+
mdbq-3.6.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
41
|
+
mdbq-3.6.0.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
42
|
+
mdbq-3.6.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|