mdbq 1.8.4__py3-none-any.whl → 1.8.6__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/aggregation.py +12 -7
- mdbq/other/sku_picture.py +1 -0
- {mdbq-1.8.4.dist-info → mdbq-1.8.6.dist-info}/METADATA +1 -1
- {mdbq-1.8.4.dist-info → mdbq-1.8.6.dist-info}/RECORD +6 -6
- {mdbq-1.8.4.dist-info → mdbq-1.8.6.dist-info}/WHEEL +0 -0
- {mdbq-1.8.4.dist-info → mdbq-1.8.6.dist-info}/top_level.txt +0 -0
mdbq/aggregation/aggregation.py
CHANGED
@@ -452,14 +452,19 @@ class DatabaseUpdate:
|
|
452
452
|
collection_name = 'spu_商品明细'
|
453
453
|
elif name.endswith('.xlsx') and '搜索分析-排名定位-商品词下排名' in name:
|
454
454
|
# 京东商品词下排名
|
455
|
-
|
456
|
-
|
457
|
-
|
455
|
+
try:
|
456
|
+
df = pd.read_excel(os.path.join(root, name), header=0, engine='openpyxl')
|
457
|
+
if len(df) == 0:
|
458
|
+
print(f'{name} 报表数据为空')
|
459
|
+
continue
|
460
|
+
df.rename(columns={'商品的ID': 'skuid'}, inplace=True)
|
461
|
+
for col in ['词人气', '搜索点击率']:
|
462
|
+
if col in df.columns.tolist():
|
463
|
+
df[col] = df[col].apply(lambda x: round(x, 6) if x else x)
|
464
|
+
except Exception as e:
|
465
|
+
print(e)
|
466
|
+
print(name, '报错')
|
458
467
|
continue
|
459
|
-
df.rename(columns={'商品的ID': 'skuid'}, inplace=True)
|
460
|
-
for col in ['词人气', '搜索点击率']:
|
461
|
-
if col in df.columns.tolist():
|
462
|
-
df[col] = df[col].apply(lambda x: round(x, 6) if x else x)
|
463
468
|
elif name.endswith('.xlsx') and '搜索分析-排名定位-商品排名' in name:
|
464
469
|
# 京东商品排名
|
465
470
|
date_in = re.findall(r'(\d{4}-\d{2}-\d{2})-搜索', str(name))[0]
|
mdbq/other/sku_picture.py
CHANGED
@@ -708,6 +708,7 @@ def main(service_name, database):
|
|
708
708
|
def main2(service_name, database):
|
709
709
|
""" 从数据库读取数据,并下载图片到本地 """
|
710
710
|
d = DownloadPicture(service_name=service_name)
|
711
|
+
d.save_path = '/Users/xigua/Downloads/sku图片链接' # 下载图片到本地时的存储位置
|
711
712
|
d.get_df_from_service()
|
712
713
|
d.download_data()
|
713
714
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
mdbq/__init__.py,sha256=Il5Q9ATdX8yXqVxtP_nYqUhExzxPC_qk_WXQ_4h0exg,16
|
2
2
|
mdbq/__version__.py,sha256=y9Mp_8x0BCZSHsdLT_q5tX9wZwd5QgqrSIENLrb6vXA,62
|
3
3
|
mdbq/aggregation/__init__.py,sha256=EeDqX2Aml6SPx8363J-v1lz0EcZtgwIBYyCJV6CcEDU,40
|
4
|
-
mdbq/aggregation/aggregation.py,sha256=
|
4
|
+
mdbq/aggregation/aggregation.py,sha256=39BjfrWWR98zkL5JYlGCK86oPIs6Q_dYbUKXvdpoyjM,64328
|
5
5
|
mdbq/aggregation/df_types.py,sha256=oQJS2IBU3_IO6GMgbssHuC2yCjNnbta0QPGrFOwNLnU,7591
|
6
6
|
mdbq/aggregation/mysql_types.py,sha256=DQYROALDiwjJzjhaJfIIdnsrNs11i5BORlj_v6bp67Y,11062
|
7
7
|
mdbq/aggregation/optimize_data.py,sha256=u2Kl_MFtZueXJ57ycy4H2OhXD431RctUYJYCl637uT0,4176
|
@@ -30,13 +30,13 @@ mdbq/mysql/year_month_day.py,sha256=VgewoE2pJxK7ErjfviL_SMTN77ki8GVbTUcao3vFUCE,
|
|
30
30
|
mdbq/other/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
31
31
|
mdbq/other/porxy.py,sha256=UHfgEyXugogvXgsG68a7QouUCKaohTKKkI4RN-kYSdQ,4961
|
32
32
|
mdbq/other/pov_city.py,sha256=AEOmCOzOwyjHi9LLZWPKi6DUuSC-_M163664I52u9qw,21050
|
33
|
-
mdbq/other/sku_picture.py,sha256=
|
33
|
+
mdbq/other/sku_picture.py,sha256=LSydTC94j-ZKMAYyf9dBt8oWa9c3gjKXV7W9G6RTc6I,33958
|
34
34
|
mdbq/other/ua_sj.py,sha256=JuVYzc_5QZ9s_oQSrTHVKkQv4S_7-CWx4oIKOARn_9U,22178
|
35
35
|
mdbq/pbix/__init__.py,sha256=Trtfaynu9RjoTyLLYBN2xdRxTvm_zhCniUkVTAYwcjo,24
|
36
36
|
mdbq/pbix/pbix_refresh.py,sha256=JUjKW3bNEyoMVfVfo77UhguvS5AWkixvVhDbw4_MHco,2396
|
37
37
|
mdbq/pbix/refresh_all.py,sha256=0uAnBKCd5cx5FLTkawN1GV9yi87rfyMgYal5LABtumQ,7186
|
38
38
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
39
|
-
mdbq-1.8.
|
40
|
-
mdbq-1.8.
|
41
|
-
mdbq-1.8.
|
42
|
-
mdbq-1.8.
|
39
|
+
mdbq-1.8.6.dist-info/METADATA,sha256=T6WTq8XLxYLEkeOg26sam_WpqCt17598byqjA3wfMeU,245
|
40
|
+
mdbq-1.8.6.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
41
|
+
mdbq-1.8.6.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
42
|
+
mdbq-1.8.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|