feilian 1.2.3__py3-none-any.whl → 1.2.4__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.
Potentially problematic release.
This version of feilian might be problematic. Click here for more details.
- feilian/_dist_ver.py +2 -2
- feilian/process.py +4 -2
- {feilian-1.2.3.dist-info → feilian-1.2.4.dist-info}/METADATA +1 -1
- {feilian-1.2.3.dist-info → feilian-1.2.4.dist-info}/RECORD +6 -6
- {feilian-1.2.3.dist-info → feilian-1.2.4.dist-info}/WHEEL +1 -1
- {feilian-1.2.3.dist-info → feilian-1.2.4.dist-info}/top_level.txt +0 -0
feilian/_dist_ver.py
CHANGED
feilian/process.py
CHANGED
|
@@ -61,11 +61,13 @@ class BaseProcessor(abc.ABC):
|
|
|
61
61
|
self.save_result(output_path or input_path, result)
|
|
62
62
|
|
|
63
63
|
class DataframeProcessor(BaseProcessor, abc.ABC):
|
|
64
|
-
def __init__(self, input_dtype=None, progress=False, read_args: Dict[str, Any] = None
|
|
64
|
+
def __init__(self, input_dtype=None, progress=False, read_args: Dict[str, Any] = None,
|
|
65
|
+
write_args: Dict[str, Any] = None):
|
|
65
66
|
self.progress = progress
|
|
66
67
|
self.read_args = read_args or {}
|
|
67
68
|
if input_dtype is not None:
|
|
68
69
|
self.read_args['dtype'] = input_dtype
|
|
70
|
+
self.write_args = write_args or {}
|
|
69
71
|
|
|
70
72
|
def read_single_file(self, filepath: str) -> pd.DataFrame:
|
|
71
73
|
return read_dataframe(filepath, **self.read_args)
|
|
@@ -77,7 +79,7 @@ class DataframeProcessor(BaseProcessor, abc.ABC):
|
|
|
77
79
|
return super().read_data(filepath)
|
|
78
80
|
|
|
79
81
|
def save_result(self, filepath: str, result: pd.DataFrame):
|
|
80
|
-
save_dataframe(filepath, result)
|
|
82
|
+
save_dataframe(filepath, result, **self.write_args)
|
|
81
83
|
|
|
82
84
|
@abc.abstractmethod
|
|
83
85
|
def process_row(self, i: Hashable, row: pd.Series) -> Optional[Dict[str, Any]]:
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
feilian/__init__.py,sha256=97Rvz2O6LknvCWInAjINH4GeqG4-QPPcep9n-V7KD8k,911
|
|
2
|
-
feilian/_dist_ver.py,sha256=
|
|
2
|
+
feilian/_dist_ver.py,sha256=TGdOX8xyOAjxGzF3EzzykrQBIQOf5UL-RdO-kNZ39qg,148
|
|
3
3
|
feilian/arg.py,sha256=n2nIcmC_3rb9A6BOzm9C5z3-T4lnubaGzH2sFhtqwZQ,8402
|
|
4
4
|
feilian/dataframe.py,sha256=BtW6IQrXTF9hQCeccIXkedSjrpfuSKkzWGxd0VxiVHU,11390
|
|
5
5
|
feilian/datetime.py,sha256=IONvWhLeGEy9IVe6GWKEW3FhrfRrShyhGP8-RTf9r3c,763
|
|
6
6
|
feilian/io.py,sha256=aYN3QwWcLoRKzhGMNutqdkmxArVcXfeWXzxCB07LcFc,155
|
|
7
7
|
feilian/json.py,sha256=1FkQ6e4JmbccpxhMobXpsGg-f7uVrTtUmu6jDCXCFTQ,1406
|
|
8
|
-
feilian/process.py,sha256=
|
|
8
|
+
feilian/process.py,sha256=XEasezmaTHc1GNmB-v0sAbtwqMO3sOMLNRDD4GGxYp4,3267
|
|
9
9
|
feilian/string.py,sha256=G_X3dnR0Oxmi4hXF-6E5jm5M7GPjGoMYrSMyI1dj6Z4,370
|
|
10
10
|
feilian/utils.py,sha256=pzzGEgngidVkYvuNJWY7KWjkdgGRuH5_ENaLS6kxBtk,2648
|
|
11
11
|
feilian/version.py,sha256=oH_DvE7jRCWlCCX9SSadwxwRJXFas_rIisYLBGPYZn4,350
|
|
12
|
-
feilian-1.2.
|
|
13
|
-
feilian-1.2.
|
|
14
|
-
feilian-1.2.
|
|
15
|
-
feilian-1.2.
|
|
12
|
+
feilian-1.2.4.dist-info/METADATA,sha256=CNWtizgtCFtVf_C82O7rQVDI-DZUqTrHFW3ayVaz0RI,3722
|
|
13
|
+
feilian-1.2.4.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
14
|
+
feilian-1.2.4.dist-info/top_level.txt,sha256=1Q2-B6KJrcTr7drW_kik35PTVEUJLPP4wVrn0kYKwGw,8
|
|
15
|
+
feilian-1.2.4.dist-info/RECORD,,
|
|
File without changes
|