ilds 2.2.0__tar.gz → 2.2.2__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.
- {ilds-2.2.0 → ilds-2.2.2}/PKG-INFO +1 -1
- {ilds-2.2.0 → ilds-2.2.2}/ilds/excel_xlsx.py +3 -3
- {ilds-2.2.0 → ilds-2.2.2}/ilds/pd.py +14 -2
- {ilds-2.2.0 → ilds-2.2.2}/ilds/versions.py +1 -1
- {ilds-2.2.0 → ilds-2.2.2}/ilds.egg-info/PKG-INFO +1 -1
- {ilds-2.2.0 → ilds-2.2.2}/README.rst +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/__init__.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/cmd.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/__init__.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/admin.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/import_export.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/model.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/user.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/django/util.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/everything.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/excel_xlrd.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/file.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/__init__.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/browsercookie.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/configobj/__init__.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/configobj/_version.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/configobj/validate.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/lib/hexdump.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/match_data.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/md.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/md5summer.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/mycsv.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/net.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/spider.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/time.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds/util.py +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds.egg-info/SOURCES.txt +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds.egg-info/dependency_links.txt +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds.egg-info/requires.txt +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/ilds.egg-info/top_level.txt +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/setup.cfg +0 -0
- {ilds-2.2.0 → ilds-2.2.2}/setup.py +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
#
|
|
3
3
|
# ---------------------------------------
|
|
4
4
|
# 程序:excel_xlsx.py
|
|
5
|
-
# 版本:0.
|
|
5
|
+
# 版本:0.6
|
|
6
6
|
# 作者:lds
|
|
7
|
-
# 日期:
|
|
7
|
+
# 日期:2024-08-29
|
|
8
8
|
# 语言:Python 3.X
|
|
9
9
|
# 说明:读取excel文件内容
|
|
10
10
|
# ---------------------------------------
|
|
@@ -310,7 +310,7 @@ def save_dir_excel_specified_rows(file_dir, dst_dir=None, num_rows=10):
|
|
|
310
310
|
dst_dir.mkdir()
|
|
311
311
|
|
|
312
312
|
for file in get_dir_files(file_dir, ext='.xlsx'):
|
|
313
|
-
save_excel_specified_rows(input_file=file, output_file=dst_dir / f'
|
|
313
|
+
save_excel_specified_rows(input_file=file, output_file=dst_dir / f'{os.path.basename(file)} {num_rows}行.xlsx', start_row=1, end_row=num_rows + 1)
|
|
314
314
|
|
|
315
315
|
|
|
316
316
|
def doc():
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
#
|
|
3
3
|
# ---------------------------------------
|
|
4
4
|
# 程序:pd.py
|
|
5
|
-
# 版本:0.
|
|
5
|
+
# 版本:0.9
|
|
6
6
|
# 作者:lds
|
|
7
|
-
# 日期:2024-
|
|
7
|
+
# 日期:2024-09-12
|
|
8
8
|
# 语言:Python 3.X
|
|
9
9
|
# 说明:pandas 常用的函数集合,TODO 添加一些小抄在这里!
|
|
10
10
|
# ---------------------------------------
|
|
@@ -273,6 +273,18 @@ def writer_excel(obj, path, index=False, use_zip64=False):
|
|
|
273
273
|
writer.book.use_zip64()
|
|
274
274
|
|
|
275
275
|
|
|
276
|
+
def to_parquet(df, save_file):
|
|
277
|
+
"""
|
|
278
|
+
保存为parquet数据函数,是为了记录使用方法
|
|
279
|
+
"""
|
|
280
|
+
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_parquet.html
|
|
281
|
+
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_parquet.html
|
|
282
|
+
# 我们可以保存pyarrow数据,读取文件以后保存到当前文件夹的_d_文件夹中
|
|
283
|
+
# df = pd.read_excel(file, dtype_backend='pyarrow')
|
|
284
|
+
df.to_parquet(save_file)
|
|
285
|
+
# restored_df = pd.read_parquet('data.parquet')
|
|
286
|
+
|
|
287
|
+
|
|
276
288
|
def add_sorted_sequence_number(df, sort_column, ascending=False, sort_name='排序序号'):
|
|
277
289
|
"""
|
|
278
290
|
根据指定列的值生成排序序号,并将序号合并回原始DataFrame中
|
|
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
|