mdbq 2.3.2__py3-none-any.whl → 2.3.3__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 +3 -0
- mdbq/spider/aikucun.py +7 -0
- {mdbq-2.3.2.dist-info → mdbq-2.3.3.dist-info}/METADATA +1 -1
- {mdbq-2.3.2.dist-info → mdbq-2.3.3.dist-info}/RECORD +6 -6
- {mdbq-2.3.2.dist-info → mdbq-2.3.3.dist-info}/WHEEL +0 -0
- {mdbq-2.3.2.dist-info → mdbq-2.3.3.dist-info}/top_level.txt +0 -0
mdbq/aggregation/aggregation.py
CHANGED
@@ -526,6 +526,9 @@ class DatabaseUpdate:
|
|
526
526
|
elif name.endswith('.csv') and '竞店分析-来源分析-入店搜索词' in name:
|
527
527
|
df = pd.read_csv(os.path.join(root, name), encoding='utf-8_sig', header=0, na_filter=False)
|
528
528
|
check_remove_file = True
|
529
|
+
elif name.endswith('.csv') and '爱库存_商品榜单' in name:
|
530
|
+
df = pd.read_csv(os.path.join(root, name), encoding='utf-8_sig', header=0, na_filter=False)
|
531
|
+
check_remove_file = True
|
529
532
|
# ----------------------- 京东数据处理分界线 -----------------------
|
530
533
|
# ----------------------- 京东数据处理分界线 -----------------------
|
531
534
|
elif name.endswith('.xlsx') and '店铺来源_流量来源' in name:
|
mdbq/spider/aikucun.py
CHANGED
@@ -27,17 +27,20 @@ if platform.system() == 'Windows':
|
|
27
27
|
Data_Path = r'C:\同步空间\BaiduSyncdisk'
|
28
28
|
D_PATH = str(pathlib.Path(f'C:\\Users\\{getpass.getuser()}\\Downloads'))
|
29
29
|
Share_Path = str(pathlib.Path(r'\\192.168.1.198\时尚事业部\01.运营部\天猫报表')) # 共享文件根目录
|
30
|
+
Source_Path = str(pathlib.Path(Data_Path, '原始文件2'))
|
30
31
|
elif platform.system() == 'Linux':
|
31
32
|
Data_Path = '数据中心'
|
32
33
|
D_PATH = 'Downloads'
|
33
34
|
if not os.path.exists(D_PATH):
|
34
35
|
os.makedirs(D_PATH)
|
35
36
|
Share_Path = '' # linux 通常是远程服务器,不需要访问共享
|
37
|
+
Source_Path = str(pathlib.Path(Data_Path, '原始文件2'))
|
36
38
|
else:
|
37
39
|
Data_Path = f'/Users/{getpass.getuser()}/数据中心' # 使用Mac独立网络时
|
38
40
|
# Data_Path = '/Volumes' # 直接使用共享连接台式机时的配置, 后面接 + 自动0备份/***
|
39
41
|
D_PATH = str(pathlib.Path(f'/Users/{getpass.getuser()}/Downloads'))
|
40
42
|
Share_Path = str(pathlib.Path('/Volumes/时尚事业部/01.运营部/天猫报表')) # 共享文件根目录
|
43
|
+
Source_Path = str(pathlib.Path(Data_Path, '原始文件2'))
|
41
44
|
|
42
45
|
|
43
46
|
def test():
|
@@ -251,6 +254,10 @@ class AikuCun:
|
|
251
254
|
if not pattern:
|
252
255
|
continue
|
253
256
|
df = pd.read_csv(os.path.join(root, name), encoding='gb2312', header=0, na_filter=False)
|
257
|
+
if len(df) == 0:
|
258
|
+
print(f'数据长度为 0 : {name}')
|
259
|
+
os.remove(os.path.join(root, name))
|
260
|
+
continue
|
254
261
|
df.insert(loc=0, column='日期', value=date) # df中插入新列
|
255
262
|
df.rename(columns={'spuId': 'spu_id'}, inplace=True)
|
256
263
|
df['数据更新时间'] = pd.to_datetime(df['数据更新时间'], format='%Y-%m-%d %H:%M:%S', errors='ignore')
|
@@ -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=tt0l7ywcG0AFtBpKaiyqeqegWuOwB1-2K8VHbKn9qok,75995
|
5
5
|
mdbq/aggregation/df_types.py,sha256=U9i3q2eRPTDY8qAPTw7irzu-Tlg4CIySW9uYro81wdk,8125
|
6
6
|
mdbq/aggregation/mysql_types.py,sha256=DQYROALDiwjJzjhaJfIIdnsrNs11i5BORlj_v6bp67Y,11062
|
7
7
|
mdbq/aggregation/optimize_data.py,sha256=Wis40oL04M7E1pkvgNPjyVFAUe-zgjimjIVAikxYY8Y,4418
|
@@ -40,8 +40,8 @@ mdbq/pbix/refresh_all_old.py,sha256=_pq3WSQ728GPtEG5pfsZI2uTJhU8D6ra-htIk1JXYzw,
|
|
40
40
|
mdbq/req_post/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
|
41
41
|
mdbq/req_post/req_tb.py,sha256=P5RiXEgwQR44KhBcrgolFPipqILQ4eieDC7MpSWDlkE,18346
|
42
42
|
mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
|
43
|
-
mdbq/spider/aikucun.py,sha256=
|
44
|
-
mdbq-2.3.
|
45
|
-
mdbq-2.3.
|
46
|
-
mdbq-2.3.
|
47
|
-
mdbq-2.3.
|
43
|
+
mdbq/spider/aikucun.py,sha256=WJL_9Xik5C_Sk4AaPAwa3ncMR2KHxYh0R3C3CZaUpys,13916
|
44
|
+
mdbq-2.3.3.dist-info/METADATA,sha256=gptJFhHqyqxBjxIyHEwaaUXgvpBWsNW1dOvlY4ojZUs,245
|
45
|
+
mdbq-2.3.3.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
46
|
+
mdbq-2.3.3.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
|
47
|
+
mdbq-2.3.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|