/
__init__.py
157 lines (144 loc) · 2.65 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
"""A flexible and expressive pandas validation library."""
import platform
from pandera import external_config
from pandera.dtypes import (
Bool,
Category,
Complex,
Complex64,
Complex128,
DataType,
DateTime,
Float,
Float16,
Float32,
Float64,
Int,
Int8,
Int16,
Int32,
Int64,
String,
Timedelta,
Timestamp,
UInt,
UInt8,
UInt16,
UInt32,
UInt64,
)
from pandera.engines.numpy_engine import Object
from pandera.engines.pandas_engine import (
BOOL,
INT8,
INT16,
INT32,
INT64,
PANDAS_1_2_0_PLUS,
PANDAS_1_3_0_PLUS,
STRING,
UINT8,
UINT16,
UINT32,
UINT64,
pandas_version,
)
from . import errors, pandas_accessor, typing
from .checks import Check
from .decorators import check_input, check_io, check_output, check_types
from .hypotheses import Hypothesis
from .model import SchemaModel
from .model_components import Field, check, dataframe_check
from .schema_components import Column, Index, MultiIndex
from .schema_inference import infer_schema
from .schemas import DataFrameSchema, SeriesSchema
from .version import __version__
if platform.system() != "Windows":
# pylint: disable=ungrouped-imports
from pandera.dtypes import Complex256, Float128
try:
import dask.dataframe
from . import dask_accessor
except ImportError:
pass
try:
import pyspark.pandas
from . import pyspark_accessor
except ImportError:
pass
try:
import modin.pandas
from . import modin_accessor
except ImportError:
pass
__all__ = [
# dtypes
"Bool",
"Category",
"Complex",
"Complex64",
"Complex128",
"Complex256",
"DataType",
"DateTime",
"Float",
"Float16",
"Float32",
"Float64",
"Float128",
"Int",
"Int8",
"Int16",
"Int32",
"Int64",
"String",
"Timedelta",
"Timestamp",
"UInt",
"UInt8",
"UInt16",
"UInt32",
"UInt64",
# numpy_engine
"Object",
# pandas_engine
"BOOL",
"INT8",
"INT16",
"INT32",
"INT64",
"PANDAS_1_3_0_PLUS",
"STRING",
"UINT8",
"UINT16",
"UINT32",
"UINT64",
# pandera.engines.pandas_engine
"pandas_version",
# checks
"Check",
# decorators
"check_input",
"check_io",
"check_output",
"check_types",
# hypotheses
"Hypothesis",
# model
"SchemaModel",
# model_components
"Field",
"check",
"dataframe_check",
# schema_components
"Column",
"Index",
"MultiIndex",
# schema_inference
"infer_schema",
# schemas
"DataFrameSchema",
"SeriesSchema",
# version
"__version__",
]