pydiverse-common 0.3.11__py3-none-any.whl → 0.3.12__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.
- pydiverse/common/dtypes.py +9 -2
- {pydiverse_common-0.3.11.dist-info → pydiverse_common-0.3.12.dist-info}/METADATA +1 -1
- {pydiverse_common-0.3.11.dist-info → pydiverse_common-0.3.12.dist-info}/RECORD +5 -5
- {pydiverse_common-0.3.11.dist-info → pydiverse_common-0.3.12.dist-info}/WHEEL +0 -0
- {pydiverse_common-0.3.11.dist-info → pydiverse_common-0.3.12.dist-info}/licenses/LICENSE +0 -0
pydiverse/common/dtypes.py
CHANGED
@@ -311,6 +311,15 @@ class Dtype:
|
|
311
311
|
|
312
312
|
if isinstance(self, Enum):
|
313
313
|
return pd.CategoricalDtype(self.categories)
|
314
|
+
if isinstance(self, String):
|
315
|
+
return pd.StringDtype() # max_length not needed for dataframes
|
316
|
+
if isinstance(self, Decimal):
|
317
|
+
# NumericDtype exists but is not used because fixpoint is more common
|
318
|
+
# in SQL than in dataframes.
|
319
|
+
return pd.Float64Dtype()
|
320
|
+
if isinstance(self, List):
|
321
|
+
# we don't want to produce object columns
|
322
|
+
raise TypeError("pandas doesn't have a native list dtype")
|
314
323
|
|
315
324
|
return {
|
316
325
|
Int(): pd.Int64Dtype(), # we default to 64 bit
|
@@ -325,8 +334,6 @@ class Dtype:
|
|
325
334
|
Float(): pd.Float64Dtype(), # we default to 64 bit
|
326
335
|
Float32(): pd.Float32Dtype(),
|
327
336
|
Float64(): pd.Float64Dtype(),
|
328
|
-
Decimal(): pd.Float64Dtype(), # NumericDtype exists but is not used
|
329
|
-
String(): pd.StringDtype(),
|
330
337
|
Bool(): pd.BooleanDtype(),
|
331
338
|
Date(): "datetime64[s]",
|
332
339
|
Datetime(): "datetime64[us]",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: pydiverse-common
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.12
|
4
4
|
Summary: Common functionality shared between pydiverse libraries
|
5
5
|
Author: QuantCo, Inc.
|
6
6
|
Author-email: Martin Trautmann <windiana@users.sf.net>, Finn Rudolph <finn.rudolph@t-online.de>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
pydiverse/common/__init__.py,sha256=J7b4iStFyaEMYre_jdlZ4l_8dLyrMWCIpQdsMQcB8aI,806
|
2
|
-
pydiverse/common/dtypes.py,sha256=
|
2
|
+
pydiverse/common/dtypes.py,sha256=eoPzUCVZ6UG_-jjmr1W-uqIaQJh14d1qTvnxrxi9xq4,20229
|
3
3
|
pydiverse/common/testing.py,sha256=FcivI5wn0X3gzJhwnysKvCOgjSTTXaN6FtSFJ72jfSg,341
|
4
4
|
pydiverse/common/version.py,sha256=1IU_m4r76_Qq0u-Tyo2_bERZFOkh0ZFueVzDqcCfLO0,336
|
5
5
|
pydiverse/common/errors/__init__.py,sha256=FNeEfVbUa23b9sHkFsmxHYhY6sRgjaZysPQmlovpJrI,262
|
@@ -11,7 +11,7 @@ pydiverse/common/util/disposable.py,sha256=4XoGz70YRWA9TAqnUBvRCTAdsOGBviFN0gzxU
|
|
11
11
|
pydiverse/common/util/hashing.py,sha256=EofnKULVKXv-S9kry0mOqHU5bxPGomCtr6XfYqIhGgc,4650
|
12
12
|
pydiverse/common/util/import_.py,sha256=K7dSgz4YyrqEvqhoOzbwgD7D8HScMoO5XoSWtjbaoUs,4056
|
13
13
|
pydiverse/common/util/structlog.py,sha256=xxhauxMuyxcKXTVg1MiPTkuvPBj8Zcr4o_v8Bq59Nig,3778
|
14
|
-
pydiverse_common-0.3.
|
15
|
-
pydiverse_common-0.3.
|
16
|
-
pydiverse_common-0.3.
|
17
|
-
pydiverse_common-0.3.
|
14
|
+
pydiverse_common-0.3.12.dist-info/METADATA,sha256=im41Bu6fJ7PTEWoXMoRVasFnObelq_2Su8PFOyvbQPc,3400
|
15
|
+
pydiverse_common-0.3.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
pydiverse_common-0.3.12.dist-info/licenses/LICENSE,sha256=AcE6SDVuAq6v9ZLE_8eOCe_NvSE0rAPR3NR7lSowYh4,1517
|
17
|
+
pydiverse_common-0.3.12.dist-info/RECORD,,
|
File without changes
|
File without changes
|