mdbq 2.0.4__tar.gz → 2.0.5__tar.gz

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.
Files changed (46) hide show
  1. {mdbq-2.0.4 → mdbq-2.0.5}/PKG-INFO +1 -1
  2. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/aggregation.py +21 -2
  3. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/clean/data_clean.py +11 -1
  4. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq.egg-info/PKG-INFO +1 -1
  5. {mdbq-2.0.4 → mdbq-2.0.5}/setup.py +1 -1
  6. {mdbq-2.0.4 → mdbq-2.0.5}/README.txt +0 -0
  7. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/__init__.py +0 -0
  8. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/__version__.py +0 -0
  9. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/__init__.py +0 -0
  10. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/df_types.py +0 -0
  11. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/mysql_types.py +0 -0
  12. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/optimize_data.py +0 -0
  13. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/aggregation/query_data.py +0 -0
  14. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/bdup/__init__.py +0 -0
  15. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/bdup/bdup.py +0 -0
  16. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/clean/__init__.py +0 -0
  17. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/company/__init__.py +0 -0
  18. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/company/copysh.py +0 -0
  19. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/config/__init__.py +0 -0
  20. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/config/get_myconf.py +0 -0
  21. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/config/products.py +0 -0
  22. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/config/set_support.py +0 -0
  23. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/config/update_conf.py +0 -0
  24. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/dataframe/__init__.py +0 -0
  25. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/dataframe/converter.py +0 -0
  26. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/log/__init__.py +0 -0
  27. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/log/mylogger.py +0 -0
  28. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mongo/__init__.py +0 -0
  29. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mongo/mongo.py +0 -0
  30. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mysql/__init__.py +0 -0
  31. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mysql/mysql.py +0 -0
  32. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mysql/s_query.py +0 -0
  33. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/mysql/year_month_day.py +0 -0
  34. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/other/__init__.py +0 -0
  35. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/other/porxy.py +0 -0
  36. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/other/pov_city.py +0 -0
  37. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/other/sku_picture.py +0 -0
  38. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/other/ua_sj.py +0 -0
  39. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/pbix/__init__.py +0 -0
  40. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/pbix/pbix_refresh.py +0 -0
  41. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/pbix/refresh_all.py +0 -0
  42. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq/spider/__init__.py +0 -0
  43. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq.egg-info/SOURCES.txt +0 -0
  44. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq.egg-info/dependency_links.txt +0 -0
  45. {mdbq-2.0.4 → mdbq-2.0.5}/mdbq.egg-info/top_level.txt +0 -0
  46. {mdbq-2.0.4 → mdbq-2.0.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 2.0.4
3
+ Version: 2.0.5
4
4
  Home-page: https://pypi.org/project/mdbsql
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -39,10 +39,11 @@ class DatabaseUpdate:
39
39
  self.datas: list = [] # 带更新进数据库的数据集合
40
40
  self.start_date = '2022-01-01' # 日期表的起始日期
41
41
 
42
- def cleaning(self, is_move=True):
42
+ def cleaning(self, is_move=True, is_except=[]):
43
43
  """
44
44
  数据清洗, 返回包含 数据库名, 集合名称, 和 df 主体
45
45
  修改 cleaning 时,要同步 support 下的 标题对照表.csv
46
+ is_except: 需要排除不做处理的文件或文件夹
46
47
  """
47
48
  if not os.path.exists(self.path):
48
49
  print(f'1.1.0 初始化时传入了不存在的目录: {self.path}')
@@ -62,6 +63,16 @@ class DatabaseUpdate:
62
63
  check_remove_file = False # 设置这个参数的目的: 避免误删其他文件, 不是本程序数据清洗覆盖的文件不做干预
63
64
  if '~$' in name or '.DS' in name or '.localized' in name or '.ini' in name or '$RECYCLE.BIN' in name or 'Icon' in name:
64
65
  continue
66
+ is_continue = False
67
+ if is_except:
68
+ for item in is_except:
69
+ if item in os.path.join(root, name):
70
+ # print(name)
71
+ is_continue = True
72
+ break
73
+ if is_continue: # 需要排除不做处理的文件或文件夹
74
+ continue
75
+
65
76
  db_name = None # 初始化/重置变量,避免进入下一个循环
66
77
  collection_name = None
67
78
  for data in datas: # 根据标题对照表适配 db_name 和 collection_name
@@ -755,7 +766,15 @@ class DatabaseUpdate:
755
766
  for name in files:
756
767
  if '~$' in name or '.DS' in name or '.localized' in name or '.jpg' in name or '.png' in name:
757
768
  continue
758
-
769
+ is_continue = False
770
+ if is_except:
771
+ for item in is_except:
772
+ if item in os.path.join(root, name):
773
+ # print(name)
774
+ is_continue = True
775
+ break
776
+ if is_continue: # 需要排除不做处理的文件或文件夹
777
+ continue
759
778
  db_name = None # 初始化/重置变量,避免进入下一个循环
760
779
  collection_name = None
761
780
  for data in datas: # 根据标题对照表适配 db_name 和 collection_name
@@ -67,7 +67,7 @@ class DataClean:
67
67
  _df.to_csv(os.path.join(_save_paths, filenames), encoding=encoding, index=False, header=True)
68
68
 
69
69
  # @try_except
70
- def change_and_sort(self, path=None):
70
+ def change_and_sort(self, path=None, is_except=[]):
71
71
  """数据转换"""
72
72
  if not path:
73
73
  path = self.path
@@ -87,6 +87,16 @@ class DataClean:
87
87
  if '~$' in name or '.DS' in name or '.localized' in name or '.jpg' in name or '.png' in name:
88
88
  continue
89
89
 
90
+ is_continue = False
91
+ if is_except:
92
+ for item in is_except:
93
+ if item in os.path.join(root, name):
94
+ # print(name)
95
+ is_continue = True
96
+ break
97
+ if is_continue: # 需要排除不做处理的文件或文件夹
98
+ continue
99
+
90
100
  try:
91
101
  encoding = self.get_encoding(file_path=pathlib.Path(root, name))
92
102
  # ----------------- 推广报表 分割线 -----------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 2.0.4
3
+ Version: 2.0.5
4
4
  Home-page: https://pypi.org/project/mdbsql
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -3,7 +3,7 @@
3
3
  from setuptools import setup, find_packages
4
4
 
5
5
  setup(name='mdbq',
6
- version='2.0.4',
6
+ version='2.0.5',
7
7
  author='xigua, ',
8
8
  author_email="2587125111@qq.com",
9
9
  url='https://pypi.org/project/mdbsql',
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes