mdbq 1.8.5__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
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]
|
@@ -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
|
@@ -36,7 +36,7 @@ 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
|