mdbq 2.4.2__py3-none-any.whl → 2.4.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.
@@ -40,6 +40,9 @@ class DataFrameConverter(object):
40
40
  df.reset_index(inplace=True, drop=True) # 重置索引,避免下面的 df.loc[0, col] 会出错
41
41
 
42
42
  for col in cols:
43
+ if col.lower() == 'id':
44
+ df.pop(col) # 等待插入的 df 不能包含 id 列,否则可能跟现有 id 主键冲突
45
+ continue
43
46
  # 百分比在某些数据库中不兼容, 转换百分比为小数
44
47
  df[col] = df[col].apply(lambda x: float(float((str(x).rstrip("%"))) / 100) if str(x).endswith('%') and '~' not in str(x) else x)
45
48
  # 尝试转换合适的数据类型
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mdbq
3
- Version: 2.4.2
3
+ Version: 2.4.3
4
4
  Home-page: https://pypi.org/project/mdbsql
5
5
  Author: xigua,
6
6
  Author-email: 2587125111@qq.com
@@ -19,7 +19,7 @@ mdbq/config/products.py,sha256=hN9UMkM6j76HYMulTYdtr3mOhh9QdpvvrLH14a_mbFY,5980
19
19
  mdbq/config/set_support.py,sha256=xkZCX6y9Bq1ppBpJAofld4B2YtchA7fl0eT3dx3CrSI,777
20
20
  mdbq/config/update_conf.py,sha256=taL3ZqKgiVWwUrDFuaYhim9a72Hm4BHRhhDscJTziR8,4535
21
21
  mdbq/dataframe/__init__.py,sha256=2HtCN8AdRj53teXDqzysC1h8aPL-mMFy561ESmhehGQ,22
22
- mdbq/dataframe/converter.py,sha256=ljCLblx7CMygQtH7eeC-XznBT3hKDG2huSwQ0xuRjEQ,3813
22
+ mdbq/dataframe/converter.py,sha256=LT3ULDXIQA7BUz5t5SLizazjyOHLjPJDLOwa0lRqP34,3984
23
23
  mdbq/log/__init__.py,sha256=Mpbrav0s0ifLL7lVDAuePEi1hJKiSHhxcv1byBKDl5E,15
24
24
  mdbq/log/mylogger.py,sha256=oaT7Bp-Hb9jZt52seP3ISUuxVcI19s4UiqTeouScBO0,3258
25
25
  mdbq/mongo/__init__.py,sha256=SILt7xMtQIQl_m-ik9WLtJSXIVf424iYgCfE_tnQFbw,13
@@ -41,7 +41,7 @@ mdbq/req_post/__init__.py,sha256=jso1oHcy6cJEfa7udS_9uO5X6kZLoPBF8l3wCYmr5dM,18
41
41
  mdbq/req_post/req_tb.py,sha256=PexWSCPJNM6Tv0ol4lAWIhlOwsAr_frnjtcdSHCFiek,36179
42
42
  mdbq/spider/__init__.py,sha256=RBMFXGy_jd1HXZhngB2T2XTvJqki8P_Fr-pBcwijnew,18
43
43
  mdbq/spider/aikucun.py,sha256=Olq7IJP9itM4wuNxZeHOG-Q3i8wWyB4hY8TUGGwCvQ0,14104
44
- mdbq-2.4.2.dist-info/METADATA,sha256=eWoyYl2-G_Dxp_d_FEyYMYrm5YCGLzHsi-dcT98B9kQ,245
45
- mdbq-2.4.2.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
46
- mdbq-2.4.2.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
47
- mdbq-2.4.2.dist-info/RECORD,,
44
+ mdbq-2.4.3.dist-info/METADATA,sha256=Uhgb1ytjq7-MAb48QIiqM6z6DNJ8RQGHj97NgME-3w8,245
45
+ mdbq-2.4.3.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
46
+ mdbq-2.4.3.dist-info/top_level.txt,sha256=2FQ-uLnCSB-OwFiWntzmwosW3X2Xqsg0ewh1axsaylA,5
47
+ mdbq-2.4.3.dist-info/RECORD,,
File without changes