etlplus 0.12.4__py3-none-any.whl → 0.12.9__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.
- etlplus/file/_imports.py +141 -0
- etlplus/file/_io.py +1 -0
- etlplus/file/avro.py +4 -26
- etlplus/file/core.py +119 -84
- etlplus/file/dat.py +66 -0
- etlplus/file/enums.py +114 -15
- etlplus/file/feather.py +1 -1
- etlplus/file/fwf.py +66 -0
- etlplus/file/ndjson.py +2 -9
- etlplus/file/orc.py +1 -1
- etlplus/file/parquet.py +1 -1
- etlplus/file/psv.py +66 -0
- etlplus/file/stub.py +84 -0
- etlplus/file/tab.py +82 -0
- etlplus/file/txt.py +2 -9
- etlplus/file/xls.py +1 -1
- etlplus/file/xlsx.py +1 -1
- etlplus/file/yaml.py +3 -43
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/METADATA +89 -1
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/RECORD +24 -19
- etlplus/file/_pandas.py +0 -58
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/WHEEL +0 -0
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/entry_points.txt +0 -0
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/licenses/LICENSE +0 -0
- {etlplus-0.12.4.dist-info → etlplus-0.12.9.dist-info}/top_level.txt +0 -0
etlplus/file/_pandas.py
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
:mod:`etlplus.file._pandas` module.
|
|
3
|
-
|
|
4
|
-
Shared helpers for optional pandas usage.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from __future__ import annotations
|
|
8
|
-
|
|
9
|
-
from typing import Any
|
|
10
|
-
|
|
11
|
-
# SECTION: EXPORTS ========================================================== #
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
__all__ = [
|
|
15
|
-
'get_pandas',
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
# SECTION: INTERNAL CONSTANTS =============================================== #
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_PANDAS_CACHE: dict[str, Any] = {}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# SECTION: FUNCTIONS ======================================================== #
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def get_pandas(format_name: str) -> Any:
|
|
28
|
-
"""
|
|
29
|
-
Return the pandas module, importing it on first use.
|
|
30
|
-
|
|
31
|
-
Parameters
|
|
32
|
-
----------
|
|
33
|
-
format_name : str
|
|
34
|
-
Human-readable format name for error messages.
|
|
35
|
-
|
|
36
|
-
Returns
|
|
37
|
-
-------
|
|
38
|
-
Any
|
|
39
|
-
The pandas module.
|
|
40
|
-
|
|
41
|
-
Raises
|
|
42
|
-
------
|
|
43
|
-
ImportError
|
|
44
|
-
If the optional dependency is missing.
|
|
45
|
-
"""
|
|
46
|
-
mod = _PANDAS_CACHE.get('mod')
|
|
47
|
-
if mod is not None: # pragma: no cover - tiny branch
|
|
48
|
-
return mod
|
|
49
|
-
try:
|
|
50
|
-
_pd = __import__('pandas') # type: ignore[assignment]
|
|
51
|
-
except ImportError as e: # pragma: no cover
|
|
52
|
-
raise ImportError(
|
|
53
|
-
f'{format_name} support requires optional dependency "pandas".\n'
|
|
54
|
-
'Install with: pip install pandas',
|
|
55
|
-
) from e
|
|
56
|
-
_PANDAS_CACHE['mod'] = _pd
|
|
57
|
-
|
|
58
|
-
return _pd
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|