ArcticDB
ArcticDB copied to clipboard
Do not cast empty Pandas blocks to float64 when empty types are enabled
Describe the bug
#1561 Completely disables Pandas consolidation. In order to keep the behavior unchanged it has to cast empty blocks to float64. This should not happen with empty types. The dtype of empty column should be object.
Steps/Code to Reproduce
import pandas as pd
import arcticdb
import numpy
ac = arcticdb.Arctic("lmdb://test")
lib = ac.get_library("test_lib", create_if_missing=True)
s = pd.Series()
lib.write("test_sym", s)
assert lib.read("test_sym").data.dtype == np.object
Expected Results
>>> print(lib.read("test_sym").data.dtype == np.object)
True
OS, Python Version and ArcticDB Version
Python: 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] OS: Windows-10-10.0.22631-SP0 ArcticDB: dev
Backend storage used
No response
Additional Context
No response