pathpilot 0.4.1__tar.gz → 0.4.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.
- {pathpilot-0.4.1 → pathpilot-0.4.2}/PKG-INFO +1 -1
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/__init__.py +1 -1
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/df_dispatch_file.py +2 -2
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_excel.py +1 -1
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/base.py +3 -7
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pyproject.toml +1 -1
- {pathpilot-0.4.1 → pathpilot-0.4.2}/LICENSE +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/README.md +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/_utils.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/_decorators.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/base/core.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_csv.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_parquet.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_pickle.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_sqlite.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_text.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/kinds/_zip.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_file/utils.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/backup.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/__init__.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/files.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/_contents/subfolders.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/folder/core.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_folder/utils.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/_utils.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/config.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/core.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/decorators.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/exceptions.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/path.py +0 -0
- {pathpilot-0.4.1 → pathpilot-0.4.2}/pathpilot/utils.py +0 -0
|
@@ -31,7 +31,7 @@ class DfDispatchFile(File):
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
@inject_df_backend
|
|
34
|
-
def _save(self, obj, df_backend, **kwargs):
|
|
34
|
+
def _save(self, obj=None, df_backend=None, **kwargs):
|
|
35
35
|
|
|
36
36
|
if df_backend == 'pandas':
|
|
37
37
|
cast_func = odd.to_pandas_frame
|
|
@@ -40,7 +40,7 @@ class DfDispatchFile(File):
|
|
|
40
40
|
cast_func = odd.to_polars_frame
|
|
41
41
|
save_func = self._save_with_polars
|
|
42
42
|
|
|
43
|
-
if _is_frame(obj):
|
|
43
|
+
if obj is not None and _is_frame(obj):
|
|
44
44
|
obj = cast_func(obj)
|
|
45
45
|
|
|
46
46
|
save_func(obj, **kwargs)
|
|
@@ -135,8 +135,7 @@ class FolderContents(object):
|
|
|
135
135
|
------------
|
|
136
136
|
name_pattern : str
|
|
137
137
|
If not None, only object names meeting this pattern will be
|
|
138
|
-
considered candidates.
|
|
139
|
-
pd.Series.str.contains 'pat' argument.
|
|
138
|
+
considered candidates.
|
|
140
139
|
name_literal
|
|
141
140
|
Determines how 'name_pattern' is interpreted:
|
|
142
141
|
• True → literal string
|
|
@@ -157,17 +156,14 @@ class FolderContents(object):
|
|
|
157
156
|
There are a few scenarios to consider:
|
|
158
157
|
• 'date_pattern' is None → an attempt will be made to derive
|
|
159
158
|
the regex pattern using 'date_format' as the template.
|
|
160
|
-
• 'date_pattern' is not None → 'date_format' is optional
|
|
161
|
-
it can be included if you do not want to rely on
|
|
162
|
-
pd.to_datetime inferring the format.
|
|
159
|
+
• 'date_pattern' is not None → 'date_format' is optional.
|
|
163
160
|
|
|
164
161
|
Example:
|
|
165
162
|
------------
|
|
166
163
|
Dealing with the same example from above, all the following
|
|
167
164
|
combinations will achieve the same result since the None values
|
|
168
165
|
being inferred:
|
|
169
|
-
• date_pattern=r'\d{4}\-\d{2}\-\d{2}',
|
|
170
|
-
date_format='%Y-%m-%d'
|
|
166
|
+
• date_pattern=r'\d{4}\-\d{2}\-\d{2}', date_format='%Y-%m-%d'
|
|
171
167
|
• date_pattern=None, date_format='%Y-%m-%d'
|
|
172
168
|
• date_pattern=r'\d{4}\-\d{2}\-\d{2}', date_format=None
|
|
173
169
|
|
|
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
|